maped thread - now even more difficult to use than ever

Moderator: EUO Moderators

Post Reply
User avatar
speed
LAUGHING OUT LOUD LIKE A MORON
Posts: 54
Joined: Tue Jul 14, 2009 7:49 am

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

Post by speed »

Also, one more question, to add a family of creatures, (lets say minotaurs) do you input 6 for the code?
-Speed(COG) = [Grandmaster Stafffighter idk...]
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 »

speed wrote:Also, one more question, to add a family of creatures, (lets say minotaurs) do you input 6 for the code?
Yeah sounds right: Type = 1 and code = 6 to spawn random minos.
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 »

@speed: I just saw that the spawner family classes listed on the manual are outdated - actually wrong in several places. Alternatively import monsters.txt from \euo\sdat\ into excel/libreoffice/openoffice and use the numbers from the column labelled "cls".
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 »

With the latest btiles20 updates map developer need to replace 4 grass tiles that are now obsolete. I take the liberty to quote egg:
I think I added 4 new grasses about a year ago (tile numbers 11 to 14) - but will now will delete them. [..]. it is easy to replace them in maped:
i) select the normal grass tile 46
ii) mouse over one of the tiles to be deleted
iii) press alt g
iv) every instance of that tile that you are mousing over is replaced with the selected tile
v) since there are 4 grass tiles to be deleted need to do the mouse over+altg 4 times
Manually set undertiles need special treatment as every single tile has to be set manually again.

By the way, further updates to the btile20 includes the possibility to set undertiles under paths, castle, shrine, lighthouse (at least in the 16x16 version). This is optional as grass tiles are the default undertile for the above mentioned maptiles if I am not mistaken.
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 »

For those who would like to use custom heads on Maped spawner:
1) select a "s"pawner from the template you would like to use on the map
2) place the spawner on the map
3) l-click the placed spawner to edit its attributes
4) edit the 2nd line reading "code"
the three digit number (actually a hex number) in that line is the avatar code, e.g. 200 for goblin - let's name this part AAA
add infront of this number the three digit head code (code range from fe7 to fff) - let's name this part BBB
add the number 8 before the 6 digit code so it looks like this: 8BBBAAA
5) change any other settings and confirm your changes by pressing "okay"
If you done everything correctly the avatar sprite just now have a custom head (which you may or may not see under the texted displayed within Maped)
Last edited by LordMortiferus on Fri Aug 08, 2014 3:36 am, edited 1 time in total.
User avatar
Mr.Crowley
Tune in next time & see how they do it.
Posts: 508
Joined: Wed Jan 12, 2005 12:36 pm
Location: Earth

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

Post by Mr.Crowley »

Now for questions from Crowley. Can you make a spawner into a good aligned NPC by configuring the features of the spawner and add things like various dialog options, hints and tips on where to go and other speech options? And if so, how? Also, sorry for asking a question that the first post guides me to the answer of, however, I cannot seem to find the answer to my question. Have searched this thread, Cat's Maped Guide, and everything else I could look at and just cant seem to find it. Little help? :?
You will find the strength
To beat the Deamons and the Balrons
Conquer evil and slay the werewolves
Balance the peace in
Eggs ultima online....

-Ruki- His tribute song
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 »

You can convert a mob into a good aligned NPC by attaching a LUA script to the spawner. Rusty wrote a tutorial for basic scripting which also covers a function called set_align(). Cannot help you much with dialogues, other than you can make the NPC say a greeting phrase when you start talking to him using talk_line.
E.g. in your case:

Code: Select all

function crowley_good(m)
m:set_align(ALIGN_GOOD)
m.talk_line="I am a good NPC"
end
User avatar
Mr.Crowley
Tune in next time & see how they do it.
Posts: 508
Joined: Wed Jan 12, 2005 12:36 pm
Location: Earth

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

Post by Mr.Crowley »

Awesome. Thank you. Now realizing how much studying I have before me now... :shock:
You will find the strength
To beat the Deamons and the Balrons
Conquer evil and slay the werewolves
Balance the peace in
Eggs ultima online....

-Ruki- His tribute song
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 »

Just stumbled upon the following function in the API that allows you to add various dialogue options to an NPC.

Code: Select all

class Conversations  
{
public:
   void add_line(const string & name, const Item & item, const string & keyword, const string & reply);

};
1st argument is the name of the NPC (guessing this one)
2nd argument is quest item - this dialogue option becomes available if a certain quest is completed
3rd argument is the keyword you say to the NPC
4th argument is the reply from the NPC
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 »

Care to type some examples of simple quests and multi question responses?
ZUPS!!!!
User avatar
Mr.Crowley
Tune in next time & see how they do it.
Posts: 508
Joined: Wed Jan 12, 2005 12:36 pm
Location: Earth

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

Post by Mr.Crowley »

Keighn wrote:Care to type some examples of simple quests and multi question responses?
Yes please :mrgreen:


Also, figured out the basics of scripting.
You will find the strength
To beat the Deamons and the Balrons
Conquer evil and slay the werewolves
Balance the peace in
Eggs ultima online....

-Ruki- His tribute song
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 »

Keighn wrote:Care to type some examples of simple quests and multi question responses?
It seems conversations are a bit more complicated and there is more than just previous posted function, especially when it comes to quests. Never really digged into this whole thing myself, so I cannot be of much help here.
So here are the other functions I found in the API that do stuff like talking:

Code: Select all

string chat_func;
void  send_npc_reply(int id, string reply, Monster* npc);
User avatar
Catherine
English correct bastard.
Posts: 1254
Joined: Mon Sep 08, 2003 2:40 am

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

Post by Catherine »

What happened to forest - passable and forest - blocker? Ok, reading the thread they're not in this build, nor is the ground hole.

~ Question to scripters. If I wanted to put in crops to a map, how would I do that? The item codes for them seem to be 1-14 in hex, but they're not items? Also, I'd prefer it if the crops actually grew (e.g. could be harvested) rather than static, but I guess that's not possible? I know one of the Maeon maps has crops & fields.

~ Could you use the paintsets to alter the "outer world" view? i.e. at the moment the outer world view is a single tile, making all maps either require bounding (usually mountains) or look weird. It'd be a nice fudge if you could use a paintset instead, esp. for stuff like forests.
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 »

hi cat, seems you are eager to create some new awesome maps XD (totally love Valley of the Trolls)
anyway, as for your questions:

# I'll make a map containing all mtiles - on dropbox - you can copy tiles from that map to your own. (there might be a reason why egg has omitted some mtiles from the palette)

# the item codes for crops are in \euo\dat\crops.txt - look out for the columns named "code young", "sapling code", "code mature", "code harvest", e.g. a young plant is always 0x585
plant seeds are 0x583
sprouts are 0x584
To place them on a map go to "i"tems and place some gold on the map, left click the pile of gold and enter an item code from above (no need for the 0x here)
Using a script you could make them grow for sure and likely harvest-able. I used a script to animate those in Meaondir, but those are mobs.

# have to pass on the last question
Last edited by LordMortiferus on Thu Aug 07, 2014 4:17 am, edited 1 time in total.
User avatar
Catherine
English correct bastard.
Posts: 1254
Joined: Mon Sep 08, 2003 2:40 am

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

Post by Catherine »

LordMortiferus wrote:hi cat, seems you are eager to create some new awesome maps XD (totally love Valley of the Trolls)
anyway, as for your questions:

# I'll make a map containing all tiles later today and upload it to dropbox for download - I'll post the link here - then you can copy tiles from that map to your own.

# the item codes for crops are in \euo\dat\crops.txt - look out for the columns named "code young", "sapling code", "code mature", "code harvest", e.g. a young plant is always 0x585
plant seeds are 0x583
sprouts are 0x584
To place them on a map go to "i"tems and place some gold on the map, left click the pile of gold and enter an item code from above (no need for the 0x here)
Using a script you could make them grow for sure and likely harvest-able. I used a script to animate those in Meaondir, but those are mobs.

# have to pass on the last question
That'd be great :)

Some more questions -

~ Notepad++, Word, Excel all fail to open the .txt files with proper columns. Any suggestions? Also is the format 0x585<itemID> or <itemID>0x585. I'm assuming the former, but that tends to lead to disasters.

~ In the scripting thread, there's a script that copy/pastes a map. How difficult would it be to tie this to the internal day/night cycle? i.e. have a map that changes when night falls (I always wanted to do that).

~ Scripting - how feasible is a trigger tile that launches a spawner & then over-rides the global reset timer? e.g. Step on a square, x6 demons spawn but cannot be triggered until X time has passed? I'm presuming it's possible.

~ New build of MapEd hates me alt-tabbing out of it (non-fullscreen) & crashes when I do so. Anyone else get this?

~ Items - Tinted - map tiles as objects. I read the hack, and understand it (yay! and I'm hoping I can copy/paste them as easily as spawners), however: before I get creative with this, how badly will it fuck the engine up? Has it been tried at all? Aka, if I made a map with a significant amount of tinted maptiles-as-items-as-maptiles how likely would this crunch everything? Also, how does this interact with the underlay tile / item feature? (which is very sexy and precludes those odd signs/teleports on bare ground).

~ Apart from cloning spawners, is there a way to set all spawners in map to X script? e.g. for tints or extra HP / spells etc? ((Tbh, I'll probably have to beg others to script mobs)). Copy/paste is fine, just wondering if there were global map scripts.

~ No promises but I'm bored atm.
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 »

# uploaded the map file (see my previous post) - it contains all the crops as well as some examples for monster statues and maptiles as items (including tinted ones)

# you have to "import" the txt file into excel and not just "open" it, there you can set separators to be space or tab or what ever and it will automatically import the data as columns

# My guess is that the copy&past script is not feasible for what you have in mind (data is stored in external files), but in general it should not be a problem to change a whole map as a function tied to in game time. More appropriate would be something like the apoc script.

# I have problems with Maped on my new laptop as well especially when firefox is running in the background.

# you can copy items by simple ctrl-leftclicking them and then use left click for pasting. Using maptiles as items should not be a problem - make sure they are set as furnitures. As all items, these are drawn over the actual maptiles and do not interfere with the underlying maptile and its undertile. However, all maptile as items do block movement as far as I remember and if the maptile blocks vision the item will do so as well.

# right of my head, you can manipulate spawners via a load_map script, e.g. as is done for instances, but on a normal map this is not feasible cause respawns are not affected. Your best bet is to attach a script to all spawners, I guess.
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 »

Catherine wrote:~ Scripting - how feasible is a trigger tile that launches a spawner & then over-rides the global reset timer? e.g. Step on a square, x6 demons spawn but cannot be triggered until X time has passed? I'm presuming it's possible.
somehow I skipped over this - yeah that should be possible using a step-trigger.
User avatar
Catherine
English correct bastard.
Posts: 1254
Joined: Mon Sep 08, 2003 2:40 am

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

Post by Catherine »

Got the map, brilliant. Way back in the day, Egg mentioned that there was a limit on items / map - 300? 1200? I don't want to create something that lags / causes crashes.

However, I understand more now :)

~ Looking over the scripts, I don't see an example of how to change the stats of a mob. HP / Int / MR / dmg / spells etc. I might be being daft.
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 »

Catherine wrote: Way back in the day, Egg mentioned that there was a limit on items / map - 300? 1200? I don't want to create something that lags / causes crashes.
I dunno about that - 300 or more items are quite a lot. I am not sure how many items my map used so far but the apoc script for example creats a lot of items and some other script I made for random maps recently does likewise. I never encountered any problems while testing these. Might have been a traffic issue back then as items were stored in the *.itm file on the server whereas nowadays they are included in the *.map file that is download once and stored on the clients PC. But egg may shed more light on this.

check out Rusty's guide to basic scripting with LUA for manipulating spawner.
User avatar
Catherine
English correct bastard.
Posts: 1254
Joined: Mon Sep 08, 2003 2:40 am

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

Post by Catherine »

LordMortiferus wrote:
Catherine wrote: Way back in the day, Egg mentioned that there was a limit on items / map - 300? 1200? I don't want to create something that lags / causes crashes.
I dunno about that - 300 or more items are quite a lot. I am not sure how many items my map used so far but the apoc script for example creats a lot of items and some other script I made for random maps recently does likewise. I never encountered any problems while testing these. Might have been a traffic issue back then as items were stored in the *.itm file on the server whereas nowadays they are included in the *.map file that is download once and stored on the clients PC. But egg may shed more light on this.

check out Rusty's guide to basic scripting with LUA for manipulating spawner.

Yeah, but if all the boundary map tiles are maptiles-as-items-plus-tint on a 100x100 map, it might cause an aneurism.

Thanks for the link.


Prepped :) (now disappears for another 8 years...)
Post Reply