maped thread - now even more difficult to use than ever

Moderator: EUO Moderators

Post Reply
User avatar
Keighn
Stop posting already --;
Posts: 5509
Joined: Sat Jun 26, 2004 10:13 am
Location: Hey.... pssttt Back in Orgeon

Re: maped thread - now even more difficult to use than ever

Post by Keighn »

Rusty76 wrote:
Evanthia wrote:Is it possible, on a CLH map, to make a door with a special key to limit access to that one room
There is no point because a crafty player could gain access to a restricted room anyway. All clan resources are shared by all members so if you want to keep certain things secure and not shared with everyone keep them in your house or bank.
That's pretty much true. Except I did create a room that couldn't be entered in mib for the longest while. Now with regions, hah. I could create a room no one could enter ever unless extremely patient in their metamapping.
User avatar
LordMortiferus
MACRO > me
Posts: 872
Joined: Tue Dec 01, 2009 10:23 pm

Re: maped thread - now even more difficult to use than ever

Post by LordMortiferus »

I have a problem with TRP. They only work if you step/blink on them, but not when you got teleported on them.

For example in the small caslte in Tangled Forest there are TRP's features in the washrooms on the different levels. Now if you step on the TRP in the upper level you fall on the TRP-spot one level below, but this second TRP-Feature will not be automatically activated.

If possible it would be nice if this can be changed, so that the TRP is activated by stepping, blinking and teleporting on the tile.
User avatar
Keighn
Stop posting already --;
Posts: 5509
Joined: Sat Jun 26, 2004 10:13 am
Location: Hey.... pssttt Back in Orgeon

Re: maped thread - now even more difficult to use than ever

Post by Keighn »

I've ran into that before too. I'm not sure if the same can be said for teleporting or trapdoors to the top of waterfalls either.
User avatar
dshadowplay
buying vamp LS of any kind +5
Posts: 81
Joined: Mon Oct 02, 2006 6:22 am

Re: maped thread - now even more difficult to use than ever

Post by dshadowplay »

If you change the avatar of a monster, (m.code = 0xcode) will that also change what the monster is reffered to in the chat window?
e.g. 'Hit by a brazier! (8 damage)'
Image
User avatar
Keighn
Stop posting already --;
Posts: 5509
Joined: Sat Jun 26, 2004 10:13 am
Location: Hey.... pssttt Back in Orgeon

Re: maped thread - now even more difficult to use than ever

Post by Keighn »

Lately, I've seen many maps that are broken from being able to blink/cyan when you couldn't before. This was due to the awesome application of regions.

What I want to know is if you have to put the noblink in each region for them to work correctly?

Valley of the Trolls is a prime example of this. The storyline in some of the beginning journals states that the blackrock deposits prevent much of the magic including blinking.
User avatar
Rusty76
Posting from my ass computer.
Posts: 600
Joined: Mon May 22, 2006 4:28 pm
Location: Cleveland, TX USA

Re: maped thread - now even more difficult to use than ever

Post by Rusty76 »

dshadowplay wrote:If you change the avatar of a monster, (m.code = 0xcode) will that also change what the monster is reffered to in the chat window?
e.g. 'Hit by a brazier! (8 damage)'
Yes it will but if the mob is a boss it will have a boss name as if it were the creature it originally was. There is a way to fix this but I cant remember it right now.

Something else about changing mob codes, if you attach a script to a spawner that changes a mob's code it effects how it spawns. Since the mob's code is different than the mob the spawner is supposed to spawn the spawner will keep spawning until it's spawn area is completely filled. Best thing to do if you want to change the code of a spawned mob is to use a -1 area and use one spawner for each mob.

EGG EDIT 2020: this is no longer the case ! change codes all you like
User avatar
eggmceye
hello
Posts: 10577
Joined: Mon Mar 11, 2002 3:55 pm
Location: Sydney, Australia
Contact:

Re: maped thread - now even more difficult to use than ever

Post by eggmceye »

yeh changing mob codes is a bit problematic - might be better just beefing mobs up (or down) if that is what you want to achieve
User avatar
dshadowplay
buying vamp LS of any kind +5
Posts: 81
Joined: Mon Oct 02, 2006 6:22 am

Re: maped thread - now even more difficult to use than ever

Post by dshadowplay »

eggmceye wrote:yeh changing mob codes is a bit problematic - might be better just beefing mobs up (or down) if that is what you want to achieve
I am guessing you say this because ranged/magical/melee type monsters use different AI? Also it occurs to me that some monsters give status effects when they attack players (snakes with poison, undead types with disease) This makes me think of many more questions..

a) Can you make a monster ranged that is not normally ranged? (guessing it would take 3 lines; ranged=true, ranged_srpite=xxxxx, ranged_distance=x)

b) Can you change a monsters sight with script? (that 2x2 ettin in lost jungle is blind as a bat! :LAUGHING OUT LOUD LIKE A MORON:)

c) Can you change a monsters shooting range?

d) I am thinking that a ranged monster will always use its ranged attack even whey a player stands right next to it, is this true?

e) I am also thinking that the setting for dmg_dice/dmg_sides is used for both ranged and hand-to-hand, is this true or is there a separate ranged_dmg_dice/ranged_dmg_sides?

f) Is there a line of script to make a monster inflict a status effect on a player after a successful hit?

g) Does the treasure code have anything to do with how good of weap/armour drop? (I read Rusty's guide to basic scripting but this was not clear to me, is it this part maybe?

Code: Select all

-- The first digit determines the drop quality. It ranges from 0 (worst) to f (best)
Also that is an important bit of info you gave Rusty about the spawners with changed mob codes. You have already helped out much but can you find out what needs to be done so that boss names will not be funky for changed mob code spawners? I guess I have been bugging you alot lately but what can I say? You the bovine who gives untill it hurts! :o :cow: :o :cow: :o :cow: :o :cow: :o :cow: :o :cow: :o :cow: :o :cow: :o :cow: :o :cow: :o :o :cow: :o :cow: :o :o :cow: :o

Another thing that has been nagging me is that bit about custom summons, if it is something you think I would be able to understand could you post an example of how it would be done or somehting?

Boy I love editzing! X-D
Image
User avatar
Rusty76
Posting from my ass computer.
Posts: 600
Joined: Mon May 22, 2006 4:28 pm
Location: Cleveland, TX USA

Re: maped thread - now even more difficult to use than ever

Post by Rusty76 »

@dshadowplay

a. Not really. best thing to do is use a mob that already has a ranged attack, change it's avatar and set it's stats to what you want.
b. I don't think so, at least I've never done it.
c. Again, I don't think so, at least I've never done it.
d. Yes
e. Ranged attacks and melee attacks use the same dmg dice/sides.
f. Not exactly. That kinda falls under custom effects like the custom monster summoning.
g. That first digit has to do with weapon/armor/jewelry drops only. Higher value = higher + of drops

The following code snippet is used in the Labyrinth. One of the normal mob spawns in there is sometimes converted into a minotaur. The code below sets the name of the mob to a normal minotaur name. Note that minotaurs are code 235 so that is what is used in the get_boss_name function.

Code: Select all

      if m.boss then
      	m:set_name(get_boss_name(0x235))
      end
The next code snippet is the most basic example i can think of to show how custom summoning works. It works by creating a separate heartbeat function for the mob. The heartbeat function is executed every time the mob gets a turn to make an action. I put the "if math.random(1, 50) == 1" in there to make it only spawn a snake 1 out of every 50 turns it gets. The "m.target_id >= 0" part makes sure it only spawns when the mob is attacking something. The "m2.time_alive = 60" line makes the summon only last for 60 seconds. The "send_simple_event" line makes the typical summon sound and flash. The "update_everyones_fov" refreshes everyone's view around the monster so the summon can bee seen immediately. Note that 210 is the code for snakes. m.x, m.y and m.map_level specify the location of the summoning monster.

Code: Select all

function es_spawn_snakes(m)

   m.heartbeat_func = "es_spawn_snakes_heartbeat"

end

function es_spawn_snakes_heartbeat(m)

   if math.random(1,50) == 1 and m.target_id >= 0 then
      m2 = spawn_at(0x210, m.x, m.y, m.map_level)
      m2.time_alive = 60
      simple_send_event(m2.id, EVENT_MAGIC, 0x17, m2.x, m2.y)
      update_everyones_fov(m)
   end

end
User avatar
dshadowplay
buying vamp LS of any kind +5
Posts: 81
Joined: Mon Oct 02, 2006 6:22 am

Re: maped thread - now even more difficult to use than ever

Post by dshadowplay »

Hmm, so I am thinking that you would have to only use spot spawners for this method of custom summoning.

Another variable that has occured to me is, what would happen if you gave a monster that does not normally cast (like a shadow warrior) spells? would it stil be able to cast them? Also would it cast them once it got right next to you as well? And the same question for ranged monsters.
Image
User avatar
Rusty76
Posting from my ass computer.
Posts: 600
Joined: Mon May 22, 2006 4:28 pm
Location: Cleveland, TX USA

Re: maped thread - now even more difficult to use than ever

Post by Rusty76 »

What do you mean by spot spawners? If you mean the single mob only spawners with a -1 area then no you don't have to do that with mobs that use custom summoning. That's only an issue if you change the avatar of a monster.

if you give a mob that doesn't normally have spells a spell it will cast it. Just be sure you set it's int value as well. A mob that normally doesn't cast spells probably has a low int value. Also giving a monster a spell will change it's AI a bit. It won't just come right up to you and attack anymore, it'll dance around like a normal mob with ranged or spells does. The custom summoning doesn't count as a spell and doesn't effect the mob's AI.

Spells work like ranged. Doesn't matter if a mob is away from you or right next to you, it'll still try to cast or shoot. That is the case for all normal spellcasting mobs. Sometimes a good strategy for fighting mobs that attack with spells is to stand next to them while fighting them. Sometimes instead of using a spell they will hit with their melee attack (which is usually weaker than their spell damage) instead of using a magic attack. I've found that this can cut down damage from monsters quite a bit.
User avatar
dshadowplay
buying vamp LS of any kind +5
Posts: 81
Joined: Mon Oct 02, 2006 6:22 am

Re: maped thread - now even more difficult to use than ever

Post by dshadowplay »

This part was making me think you would need to use single mob only spawners;

Code: Select all

m2 = spawn_at(0x210, m.x, m.y, m.map_level)
If that is not the case though then great.

p.s. I'm gonna send you another map in a few days! :o
Image
User avatar
dshadowplay
buying vamp LS of any kind +5
Posts: 81
Joined: Mon Oct 02, 2006 6:22 am

Re: maped thread - now even more difficult to use than ever

Post by dshadowplay »

MapEd already has alot of helpful functions, (Especially for editing features) however I think there are some things that could be done to make it even better;
  • While hovering mouse over a chest let pressing +/- increase/decrease the quality of chest, for monster spawners let +/- increase/decrease the quantity of total monsters to be spawned.
  • We need a way to copy and paste sections of terrain and items, possibly it could work similar to how regions are created? (How are people doing it now other that renumbering a map to copy it?)
  • Runic for 'hoo' feature.
  • It would be nice if you could make a cross-level, instant&invisable teleporter without having to use the 'trd' feature to achieve this.
  • 'trp' should have a way to make it un-disarmable for when someone wants to use it as an area hazard instead of a trap.
  • Why can't we place light sources? (Apparently this was possible before?)
  • Would like a new feature that worked like 'snc' for stopping players from blinking onto a tile but still allowed monsters to walk on it and spawn on it.
  • Another new feature that worked like 'jai' for stopping players from using blink but still allowed them to cast or use town portal.
  • A command that deleted all items from a map would help when renumbering/copying a map. (Unless there is one and I don't know it.)
  • When you copy and paste (c and v) xy into a 'lxy' it changes the value to -1.
Also this should probably go in the ideas thread but man it would sure be cool if all the fields were put in so we could place them as features.
fields.png
I think that the purple fields that euo uses for barriers should be changed to yellow fields too as purple is for sleep I think. :o :o :o
yellow field.png
You do not have the required permissions to view the files attached to this post.
Last edited by dshadowplay on Mon Aug 29, 2011 4:07 pm, edited 5 times in total.
Image
User avatar
dshadowplay
buying vamp LS of any kind +5
Posts: 81
Joined: Mon Oct 02, 2006 6:22 am

Re: maped thread - now even more difficult to use than ever

Post by dshadowplay »

Keighn wrote:
dshadowplay wrote:I have a few questions on waterfall usage,

b) If i do place a waterfall on grass will players be able to walk through it on the waterfalls left or right sides?
Yes and underneath. But if they walk above it they're subject to the FALLS and take damage falling just below it.
I dont think that this is true, I can not go on a waterfall placed on a water tile where the MIB clanhall used to be with my raft, you can 'u'se a raft to go on the northwest waterfall there but I think this is a cheese and you will notice that you can not travel to the waterfall that is southeast of it.

Also I went to Bakyre to test if my pet dragon would go through a waterfall placed on a water tile, it would not.

It would appear you can not walk through lavafalls that are placed on grass either. (went to the bottom of blood moor to find this out)
Last edited by dshadowplay on Sat May 01, 2010 7:08 pm, edited 1 time in total.
Image
User avatar
Keighn
Stop posting already --;
Posts: 5509
Joined: Sat Jun 26, 2004 10:13 am
Location: Hey.... pssttt Back in Orgeon

Re: maped thread - now even more difficult to use than ever

Post by Keighn »

Waterfalls are a rather fun thing to toy with. I think you can actually Klimb a waterfall if it is places on a mountian tile. Not so much of a cheese as a way perhaps to make a dramatic map using water. I've yet to see this done, but I know I've tested this when my home server worked. Lately, I just get some patching comment and it never loads up.

Oddly, lava falls don't do what waterfalls do.

Void is extremely deadly when used in conjuction with a waterfall. It might even be so with cursed cyans or traps/trapdoors/teleports that have someone land on a void.

I actually wish there were tiles that emulated waterfalls with less damage or none but forces you forced you down the river. Rapids/current/cataracts. Until then a series of teleports or a lua will have to suffice.

Waterfalls in a different direction would be cool too, but alas someone would need to make the graphics for them to look decent.

Ability to set the damge for waterfalls, lava, deep water, and drowing in other water.

That all falls under a Maped wantlist than help with the current one. I imagine if more maps were made and submitted these requests might be looked at more closely. Rusty posted a link to a more current listing of maps made by people invested in euo and by far it appears egg has done the majority of the submitting.
User avatar
dshadowplay
buying vamp LS of any kind +5
Posts: 81
Joined: Mon Oct 02, 2006 6:22 am

Re: maped thread - now even more difficult to use than ever

Post by dshadowplay »

I want to further clarify custom summoning for anyone interested, Rusty posted;

Code: Select all

function es_spawn_snakes(m)

   m.heartbeat_func = "es_spawn_snakes_heartbeat"

end

function es_spawn_snakes_heartbeat(m)

   if math.random(1,50) == 1 and m.target_id >= 0 then
      m2 = spawn_at(0x210, m.x, m.y, m.map_level)
      m2.time_alive = 60
      simple_send_event(m2.id, EVENT_MAGIC, 0x17, m2.x, m2.y)
      update_everyones_fov(m)
   end

end
So let me now give an example of what a 2x2 buffed vampire that summons elder vampires would look like;

function es_giant_vampire(m) -- es stands for example script :P , if the script was for 'm'inotaur 'h'alls it would be: function mh_giant_vampire(m)
m.large = true
m:set_hp_max(12000)
m:set_dmg_dice(20)
m:set_dmg_sides(7)
m:set_thaco(80)
m:set_base_ac(50)
m:set_magic_resistance(2500)
m:set_intel(2500)
m.xp_kill=18000
m.treasure = 0xfffff
m.heartbeat_func = "es_spawn_elder_vampire_heartbeat"
end

function es_spawn_elder_vampire_heartbeat(m)
if math.random(1,40) == 1 and m.target_id >= 0 then -- this is how often the sumoning monster will summon. (1 in 40 turns)
m2 = spawn_at(0x2a9, m.x, m.y, m.map_level) -- you do not replace m.x, m.y or m.map_level. '2a9' is the code for elder vampires which you can look up in maped.
m2.time_alive = 90 -- again this is how long summoned monster will stay before vanishing.
simple_send_event(m2.id, EVENT_MAGIC, 0x17, m2.x, m2.y)
update_everyones_fov(m)
end
end
Image
User avatar
hellslave
I used to bake rockcakes in my bakery.
Posts: 162
Joined: Sun Jun 20, 2004 9:40 pm

Re: maped thread - now even more difficult to use than ever

Post by hellslave »

moved from the posts I made in the scripting thread (cause I'm a tard that didn't realise the topic hadn't been active in almost 4 years)

Working on some scripts for a map I've got in my head atm. Is there a data structure that contains pointers to all the mobs in a map/region? i.e. If I want to change the heartbeat function of all of a certain type of monster is there a container with all the monsters I can iterate through and compare the ID? (The idea here is I want to have a Golem that when it reaches half health will split into 2 golems with half the original health, and do this about 4 times so that a single golem will become 16 golems with much lower health and possibly other stats by the time you actually kill it).

I don't see any methods for setting stats on a mob (i'd like to fiddle with def and MR on a few) is it possible? shown in dshadowplay's post
I don't see a method for setting the sprite of a mob (e.g. like Rusty did in deja vu(?)) m.code = 0xcode

the nordWizard example in the scripting thread teaches the wizard "zap" which I'm guessing is the lightning spell, is there a list anywhere with all the short names for the spells?

if using the spawn_at method inside the load_map_xxx function (instead of set spawners) will this be called repeatedly when any player enters the map? If not, how regularly will it be called? (I do actually have a reason for doing this!)... although maybe running the function inside a single spawner would be a better idea.
A balanced diet is a cookie in each hand :jam:
User avatar
Rusty76
Posting from my ass computer.
Posts: 600
Joined: Mon May 22, 2006 4:28 pm
Location: Cleveland, TX USA

Re: maped thread - now even more difficult to use than ever

Post by Rusty76 »

Here's the code for the Evil Slime. It works similar to what you are wanting the golem to do. The next time I see you on I'll spawn one for you so you can see it work.

Code: Select all

--- event_mobs_slime.lua
--- by Rusty Patterson, 06/06/08

-- This is an powerful slime that splits multiple times.

---require("funcs")

-- START EVIL SLIME

function evil_slime_init(m)

   m:unlearn_spells()
   m:set_magic_resistance(5000)
   m:set_name("Evil Slime")
   m:set_align(ALIGN_EVIL)
   m:set_hp_max(10000)
   m:set_intel(10)
   m:set_dmg_dice(25)
   m:set_dmg_sides(3)
   m:set_thaco(50)
   m:set_base_ac(50)
     m.xp_kill=10000
     m.immune_to_glassing=true;
     m.death_func="evil_slime_dies";
     m.large=true;
     
end

function evil_slime_dies(m)

--- Evil Slime splits into somewhat unevenly powered pieces

   mc=spawn_at(0x21a,m.x+2,m.y,m.map_level)
   strong_slime_init(mc,math.random(10,25))
   mc=spawn_at(0x21a,m.x-2,m.y,m.map_level)
   strong_slime_init(mc,math.random(10,25))
   mc=spawn_at(0x21a,m.x,m.y+2,m.map_level)
   strong_slime_init(mc,math.random(10,25))
   mc=spawn_at(0x21a,m.x,m.y-2,m.map_level)
   strong_slime_init(mc,math.random(10,25))
   update_everyones_fov(mc)
   local_msg(m,"The Evil Slime splits!")

end

-- END EVIL SLIME

--- START STRONG SLIME
--- these slimes are spawned at variable strengths
--- pct is a value from 1 to 100

function strong_slime_init(m,pct)

   m:unlearn_spells()
   m:set_magic_resistance(5000*pct/100)
   m:set_align(ALIGN_EVIL)
   m:set_hp_max(10000*pct/100)
   m:set_intel(10)
   m:set_dmg_dice(15)
   m:set_dmg_sides(3)
   m:set_thaco(25)
   m:set_base_ac(25)
   m.xp_kill = 10000*pct/100
   m.immune_to_glassing=true
   m.death_func="strong_slime_dies"
  
end

function strong_slime_dies(m)

   if m.xp_kill > 250 then   --- if the xp for killing the strong slime is > 250 then the slime splits into 2 half as powerful slimes.
      mc=spawn_at(0x21a,m.x,m.y,m.map_level)
      strong_slime_init(mc,100*m.xp_kill/10000/2)
      mc=spawn_at(0x21a,m.x,m.y,m.map_level)
      strong_slime_init(mc,100*m.xp_kill/10000/2)
      update_everyones_fov(mc)
      local_msg(m,"The slime splits!")
   end
end

-- END STRONG SLIME
User avatar
hellslave
I used to bake rockcakes in my bakery.
Posts: 162
Joined: Sun Jun 20, 2004 9:40 pm

Re: maped thread - now even more difficult to use than ever

Post by hellslave »

thanks rusty, that'll help as reference, saw atraxis in game and he's given me a couple of the event scripts to help out. Sent him my first sample boss script and he said it looked ok so I'm gonna get started on some of the other scripted mobs. One question though, do all scripts for a map have to be in a single file or can they be split into different files (1 file per boss and a file for spawner scripts for example)
A balanced diet is a cookie in each hand :jam:
User avatar
Rusty76
Posting from my ass computer.
Posts: 600
Joined: Mon May 22, 2006 4:28 pm
Location: Cleveland, TX USA

Re: maped thread - now even more difficult to use than ever

Post by Rusty76 »

You can put them all in one file or in separate files, it doesn't matter. Just make sure your functions have unique names so they don't interfere with existing functions.
Post Reply