Help, I'm Dumb

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.
mr.hackcrag
Round Table Hero
Round Table Hero
Posts: 1525
Joined: 05 Jul 2006

Help, I'm Dumb

Unread postby mr.hackcrag » 06 Aug 2006, 00:33

Fnord, I remember you mentioned to check the neutral town script as a guide on unit re-arrangement. Well, I've looked it over many times and tried experimenting. All and all, I really have no clue what to make of all these letters and numbers. :| Is there some kind of reference you have to know what all these codes stand for?

As an aside, I still never figured out to change eagle eye skill to reflect my sptrait file. I messed with it, and then there was some stability problem when I played and the game crashed. I don't even know what I did. I guess I'm a hopeless cause. :(

Just out of curiosity, how long did it take you to learn all of this? Did you already have a lot of experience, or did you just jump right into it?

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Re: Help, I'm Dumb

Unread postby Fnord » 06 Aug 2006, 00:48

mr.hackcrag wrote:Fnord, I remember you mentioned to check the neutral town script as a guide on unit re-arrangement. Well, I've looked it over many times and tried experimenting. All and all, I really have no clue what to make of all these letters and numbers. :| Is there some kind of reference you have to know what all these codes stand for?
I think most of the lines have some comments beside them. You can look up the specific commands and codes in the ERM HMTL Help file. The creature numbers, town numbers etc. in the various "Format" lists.
mr.hackcrag wrote: As an aside, I still never figured out to change eagle eye skill to reflect my sptrait file. I messed with it, and then there was some stability problem when I played and the game crashed. I don't even know what I did. I guess I'm a hopeless cause. :(
I haven't really worked with Sptraits myself much. What were you trying to do with Eagle Eye skill exactly?
mr.hackcrag wrote: Just out of curiosity, how long did it take you to learn all of this? Did you already have a lot of experience, or did you just jump right into it?
I started learning ERM a bit before the first WoG release (I suppose not too long after the "standalone ERM" was released by Slava several years ago) but at that time ERM was only about 1/20 or 1/50 of its size and complexity (or maybe less). On the other hand, nobody (other than Slava) had done any scripts and I was struggling at first to understand how it worked from his initial reference notes and had to ask him about a some of the things.

I already had some programming experience (high school and college) so that helped.

So yeah, I sort of jumped right in, but it was quite different than it is now in what you could do as there were no variables at the time and only 10 conditional flags. Most of the triggers and receivers simply didn't exist. They were added over time (requested by myself and others, as well as the ones Slava gave us without requests) so I learned most of the new stuff gradually.

I've done a lot of ERM scripting over these years, but some of the team members have caught on to ERM pretty fast and have done some things that I never even thought of or solved problems that I had no idea could be solved with ERM.
- Fnord

User avatar
Beholder
Scout
Scout
Posts: 150
Joined: 27 Feb 2006
Location: Poland, Kraków
Contact:

Unread postby Beholder » 06 Aug 2006, 08:31

what are you trying to do with eagle eye? There`s no connection between eagle eye and SPtraits file. SPtraits file holds info about spells like level, mana cost, efect, magic school etc.
Beholder

mr.hackcrag
Round Table Hero
Round Table Hero
Posts: 1525
Joined: 05 Jul 2006

Unread postby mr.hackcrag » 06 Aug 2006, 16:02

Ah finally, it starting to make sense to me now. But I was wondering, if I was to write an entirely new script, how would I get it too appear in the "Wog options" in game so I can activate it? Right now, I can only edit the existing scripts.

And another thing, is it important that I copy everything exactly as it is in the neutral town script (67). For example, does every code have to be in the proper line if I was going to start from scracth, or are the lines just for reference. I have no problem with editing existing scripts, but I don't know if I'll be able to do one from scratch and make it perfect. Especially for adjusting creature costs, growth, and banks. I think I need more practice.
what are you trying to do with eagle eye? There`s no connection between eagle eye and SPtraits file. SPtraits file holds info about spells like level, mana cost, efect, magic school etc.
Actually, since I re-arranged the level of some spells, the eagle eye skill learns them as if they were at the original levels. For example, it considers armageddon a 4th level spell, when on my sptrait, it's a 5th level.

I've finally figured out what I was doing wrong, and I'm pretty sure I know how to fix everything now. Thanks for all your help Fnord. I really appreciate it. ;)

EDIT: I take that last paragraph back. I changed all the numbers taken from the "format" section accordingly, but now, when I level up with eagle eye skill, a bunch of strange coded text comes up. If I just click on the check box, it eventually let's me choose between two spells to learn, the way it's supposed to. It seems this only happens at basic eagle eye, but I could be wrong. Also, one time blind appeared as both my choices when I gained a level.

I tested with a hero who had eagle eye as a specialty, and maps seemed to delay a lot longer during "wogification." This never happened before I made the changes. One time, a map crashed before it even started "wogification." Any thoughts?

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Unread postby Fnord » 07 Aug 2006, 20:55

mr.hackcrag wrote:Ah finally, it starting to make sense to me now. But I was wondering, if I was to write an entirely new script, how would I get it too appear in the "Wog options" in game so I can activate it? Right now, I can only edit the existing scripts.
Name the script as script##.erm where ## is any number between 00 and 99, however, official wogify scripts already use 00 through 77 (inclusive) so you should ideally use 78 through 99. Note that these will all be used in the next (eventual) release of WoG (3.59) but that will also extend the range to three digits.
mr.hackcrag wrote: And another thing, is it important that I copy everything exactly as it is in the neutral town script (67). For example, does every code have to be in the proper line if I was going to start from scracth, or are the lines just for reference. I have no problem with editing existing scripts, but I don't know if I'll be able to do one from scratch and make it perfect. Especially for adjusting creature costs, growth, and banks. I think I need more practice.
The lines don't have to be on the exact same lines. Each trigger (a line starting !?) will have a number of line following it and they should all be kept together (although you can add blank lines or comments without any problem) but other than that, most of the time, you totally rearrange the trigger sections (that is, trigger plus code that follows up to the next trigger) within a script and it would still work fine. There are a few rare exceptions but I won't get into that right now.
mr.hackcrag wrote: I've finally figured out what I was doing wrong, and I'm pretty sure I know how to fix everything now. Thanks for all your help Fnord. I really appreciate it. ;)
You're welcome and I hope you're able to figure out the new problems. :)
mr.hackcrag wrote: EDIT: I take that last paragraph back. I changed all the numbers taken from the "format" section accordingly, but now, when I level up with eagle eye skill, a bunch of strange coded text comes up. If I just click on the check box, it eventually let's me choose between two spells to learn, the way it's supposed to. It seems this only happens at basic eagle eye, but I could be wrong. Also, one time blind appeared as both my choices when I gained a level.

I tested with a hero who had eagle eye as a specialty, and maps seemed to delay a lot longer during "wogification." This never happened before I made the changes. One time, a map crashed before it even started "wogification." Any thoughts?
This is impossible to say without more information but it's quite likely that you've accidentally changed something else as well. It could be as simple as a semicolon out of place in one of the lines or perhaps you ended up reduces the number of possible spell numbers. I really don't know. I suggest to go back to the original version and then change a single number carefully and try it. If it works, try another.

Tip: You can edit and save a script and then restart a map (press O then R to use the keyboard shortcuts) and it will start over again with the changed scripts. Occasionally, especially with larger maps, this may result in an immediate crash (especially if you do it a few times) but with smaller maps it rarely does.
- Fnord

mr.hackcrag
Round Table Hero
Round Table Hero
Posts: 1525
Joined: 05 Jul 2006

Unread postby mr.hackcrag » 07 Aug 2006, 21:11

Name the script as script##.erm where ## is any number between 00 and 99, however, official wogify scripts already use 00 through 77 (inclusive) so you should ideally use 78 through 99. Note that these will all be used in the next (eventual) release of WoG (3.59) but that will also extend the range to three digits.
I tried that before, but it didn't seem to work. I think it's because my script might be incomplete. However the scripts effect still took place, I just didn't see an option to activate it or not.

As for eagle eye, you mentioned something like maybe I reduced the number of possible spell numbers. Well, in the original file, on levels 1-4 their were 15 spells on each level. After I had made changes to it, on levels 1-4, I had: 17, 12, 15, 13 spells respectively. I assume this is the problem, but what should I do to fix it?

While I'm working on my troop arrangement script, do you reccomend that I change the cost of creature dwellings in the same script, or can I use trait files to do it. I ask because at the moment, I find working with trait files easier for me than using erm.

And is there a creature number in the format section for sylvan centaurs? I didn't find one.

Sorry that I keep adding stuff, but how do I modify a creatures special ability? In this case, replacing a nightmares death stare with a hell steeds firewall ability.

Thanks so much for your feedback. I don't what I'd do without you. :)

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Unread postby Fnord » 09 Aug 2006, 01:36

mr.hackcrag wrote: I tried that before, but it didn't seem to work. I think it's because my script might be incomplete. However the scripts effect still took place, I just didn't see an option to activate it or not.
To make an option in the WoG Options screen, you need to either create an ERS file or edit Zsetup01.txt. Open the file in the ERM script editor in table mode and edit it there. There are instructions on how to do this in the Data\Text Resource Copy\How to Edit Zsetup Files.txt file. (If you're curious, you'll also find instructions in another file in that folder telling how to edit the stack experience bonuses.)
mr.hackcrag wrote: As for eagle eye, you mentioned something like maybe I reduced the number of possible spell numbers. Well, in the original file, on levels 1-4 their were 15 spells on each level. After I had made changes to it, on levels 1-4, I had: 17, 12, 15, 13 spells respectively. I assume this is the problem, but what should I do to fix it?
I have no idea. I'm not really familiar with the inner workings of that script and looking it over quickly just now doesn't tell me either. It would probably require a fair bit of study. All I can suggest for the ones that now have fewer than 15 is to try duplicating a few spells perhaps. For the one with 17--I don't know. I would guess that it would either next generate the right number to get those spells or else that the additional entries are overwriting some other variables used by another script (which will cause errors), or if they're unused, you still wouldn't be able to get them without completely rewriting the script code that selects the random spells. (Although there's probably a simple way to do it if you know what you're doing.)
mr.hackcrag wrote: While I'm working on my troop arrangement script, do you reccomend that I change the cost of creature dwellings in the same script, or can I use trait files to do it. I ask because at the moment, I find working with trait files easier for me than using erm.
You can't change the cost of creature dwellings through ERM anyway (yet) so if you wish to, you'll have to use the trait file.
mr.hackcrag wrote: And is there a creature number in the format section for sylvan centaurs? I didn't find one.
Yes, Format C, #192 is Sylvan Centaur. It should go up to 196 (which is the Dracolich).
mr.hackcrag wrote: Sorry that I keep adding stuff, but how do I modify a creatures special ability? In this case, replacing a nightmares death stare with a hell steeds firewall ability.

Thanks so much for your feedback. I don't what I'd do without you. :)
The Deathstare ability can't be added or removed at the moment (unless you're Slava and know how to edit the exe). The Firewall ability can be given as a stack experience bonus if you like (you can make a rank 0 bonus, which means the creature would always have it if you have stack XP enabled).

The name of the file (in the Data\Text Resource Copy folder) is "How to Edit Stack Experience Files.txt".

Good luck! :)
- Fnord

mr.hackcrag
Round Table Hero
Round Table Hero
Posts: 1525
Joined: 05 Jul 2006

Unread postby mr.hackcrag » 09 Aug 2006, 03:39

The eagle eye thing is really no big deal. All it says is "syntax error" but it eventually lets me choose between two spells. It doesn't really derail gameplay at all,(at least not yet) so I can live with it.
Yes, Format C, #192 is Sylvan Centaur. It should go up to 196 (which is the Dracolich).
Actually, for me, it only goes up to #173 which is santa gremlin. Must be because I don't have the most up to date script editor or something?
Good luck! :)
Thanks, right now, the only thing that's giving me any trouble is changing the creature dwellings on the adventure map to match up with the previous changes I made. After that, I think I'm all done. Guess I just need to keep experimenting. Um, I'm supposed to use "U" format for this, right?

One other thing, since you managed to change the main theme music in the game, is it also possible to change other tracks like the town themes?

User avatar
Pol
Admin
Admin
Posts: 10057
Joined: 29 Nov 2005
Location: IN SOMNIS VERITAS
Contact:

Unread postby Pol » 09 Aug 2006, 08:35

Some time ago here was update in the map editor, so you had got many new possbilities to develop. Just for sure in the case that you miss it :D This has no influence on ERM, here should be always possible to use all units numbers I thought.

All music for homm3 is hidden in its mp3 directory, so you may replace it with whatever you want, just keep the mp3 format (Seems to be 128kbit, 44100kHz, Joint Stereo, MPEG 1.0 Layer3 - just pure mp3)
"We made it!"
The Archives | Collection of H3&WoG files | Older albeit still useful | CH Downloads
PC Specs: A10-7850K, FM2A88X+K, 16GB-1600, SSD-MLC-G3, 1TB-HDD-G3, MAYA44, SP10 500W Be Quiet

mr.hackcrag
Round Table Hero
Round Table Hero
Posts: 1525
Joined: 05 Jul 2006

Unread postby mr.hackcrag » 09 Aug 2006, 12:43

Thanks Pol, actually, I downloaded the WoG map editor patch 3.0 before, and I'm pretty sure I installed it correctly.

Huge thanks for the tip about the music. I've replaced many of the town themes with themes from H2 and H4. The H2 themes really bring a sense of wonderful nostalgic bliss. I love the opera. I don't think I've ever played any game with music as good as homm.

Edit: I've been trying to make a code so that rampart heroes will have pixies replace centaurs as starting troops, but something is surely wrong with what I have so far.

!?FU6100;


!!DO6100/0/155/1:P; [iterate through all heroes to fix starting troops]
!!DO6101/16/31/1:P; [set future starting troops for rampart heroes]



** function to fix one slot

!?FU6101;

!!HEx1:C0/x16/?y1/?y2; [get y1 type y2 qty]
!!VRy1&y1=14:S118; [centaur -> pixie]
!!HEx1:C0/x16/y1/y2; [set creature type/qty]

** function to set starting troops for hero

!?FU6101;

!!HEx16:H0/118/30/45; [30-45 pixies]
!!HEx16:H2/-1/0/0; [no 3rd slot]


Well, that's it. I hope I didn't make too many mistakes, but I think I did.

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Unread postby Fnord » 11 Aug 2006, 06:47

mr.hackcrag wrote: Edit: I've been trying to make a code so that rampart heroes will have pixies replace centaurs as starting troops, but something is surely wrong with what I have so far.

!?FU6100;


!!DO6100/0/155/1:P; [iterate through all heroes to fix starting troops]
!!DO6101/16/31/1:P; [set future starting troops for rampart heroes]



** function to fix one slot

!?FU6101;

!!HEx1:C0/x16/?y1/?y2; [get y1 type y2 qty]
!!VRy1&y1=14:S118; [centaur -> pixie]
!!HEx1:C0/x16/y1/y2; [set creature type/qty]

** function to set starting troops for hero

!?FU6101;

!!HEx16:H0/118/30/45; [30-45 pixies]
!!HEx16:H2/-1/0/0; [no 3rd slot]


Well, that's it. I hope I didn't make too many mistakes, but I think I did.
Looks like you've got your Function numbers muddled a bit. You've got FU6100 at the start and then inside it you're calling FU6100 with the DO command and you have two FU6101s.
- Fnord

mr.hackcrag
Round Table Hero
Round Table Hero
Posts: 1525
Joined: 05 Jul 2006

Unread postby mr.hackcrag » 12 Aug 2006, 19:00

mr.hackcrag wrote:
Yes, Format C, #192 is Sylvan Centaur. It should go up to 196 (which is the Dracolich).
Actually, for me, it only goes up to #173 which is santa gremlin. Must be because I don't have the most up to date script editor or something?
Does anyone know how I can get creature numbers for all the creatures since my script editor only goes up to #173?

And also, where can I find the numbers for creature dwellings on the adventure map? I need to replace some of them to match the new towns I made.

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Unread postby Fnord » 12 Aug 2006, 20:55

mr.hackcrag wrote:
mr.hackcrag wrote:
Yes, Format C, #192 is Sylvan Centaur. It should go up to 196 (which is the Dracolich).
Actually, for me, it only goes up to #173 which is santa gremlin. Must be because I don't have the most up to date script editor or something?
Does anyone know how I can get creature numbers for all the creatures since my script editor only goes up to #173?

And also, where can I find the numbers for creature dwellings on the adventure map? I need to replace some of them to match the new towns I made.
The scripter help hasn't been updated (the author hasn't had time for WoG lately). Check the HTML Help instead (it should have been installed when you installed the scripter).

If your HTML Help also only goes up to 173 (actually, should be 189 including Commanders), go to the WoG Download page and download the erm_tools.wog file from the optional downloads list. Be sure to download from Fileplanet because I think the Russian site may be offline.

Dwellings can be found in the HTML Help in Format CG (Creature Generators).

http://wakeofthegods.strategyplanet.gam ... load.shtml
- Fnord

mr.hackcrag
Round Table Hero
Round Table Hero
Posts: 1525
Joined: 05 Jul 2006

Unread postby mr.hackcrag » 13 Aug 2006, 16:28

Thanks Fnord.

I have another problem though. This one is about a strange occurence I've had with phoenix. When I build the dwelling for a phoenix, it's health in the status bar says it has 200 health (which is what it's supposed to be.) But after I enter combat, it's health goes down to 100 and it stays that way for the rest of the map. Even new phoenixes recruited from town display 100 health in the status window.

I didn't write any script for a phoenix health to be reduced, and it's not a problem with any trait file. I was wondering if this is a bug, or you have any idea what the problem might be?

Edit: Is the following the only thing I need to do to change a hero's creature specialty?

!!HE21:X1/192;

The text in the hero's status window still reads like the original, but I think the new creature specialty ability still takes effect. I was just wondering if you could reinforce my assumption.

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Unread postby Fnord » 13 Aug 2006, 22:15

mr.hackcrag wrote:Thanks Fnord.

I have another problem though. This one is about a strange occurence I've had with phoenix. When I build the dwelling for a phoenix, it's health in the status bar says it has 200 health (which is what it's supposed to be.) But after I enter combat, it's health goes down to 100 and it stays that way for the rest of the map. Even new phoenixes recruited from town display 100 health in the status window.

I didn't write any script for a phoenix health to be reduced, and it's not a problem with any trait file. I was wondering if this is a bug, or you have any idea what the problem might be?
Did you WoGify the map? There are some wogify scripts that affect Phoenix Health I think (or at least one--probably Rebalanced Creatures).
mr.hackcrag wrote: Edit: Is the following the only thing I need to do to change a hero's creature specialty?

!!HE21:X1/192;

The text in the hero's status window still reads like the original, but I think the new creature specialty ability still takes effect. I was just wondering if you could reinforce my assumption.
Yes, that's right, that command will change Ivor's specialty to master of Sylvan Centaurs.

If you want to change the specialty text and/or speciality picture, use the UN:G2 command (check the HTML ERM Help for details). Note that you'll need to use a permanent z variable for changed hero specialty text.
- Fnord

mr.hackcrag
Round Table Hero
Round Table Hero
Posts: 1525
Joined: 05 Jul 2006

Unread postby mr.hackcrag » 14 Aug 2006, 18:15

Fnord wrote:
Did you WoGify the map? There are some wogify scripts that affect Phoenix Health I think (or at least one--probably Rebalanced Creatures).
None of the options that alter a creatures stats were turned on. Of course, there are so many options, I might have unknowingly missed one, but I don't think so.

I tested three different maps and I found that the phoenix health dropped to 100 on two of the maps and remained at 200 on the other.

It didn't seem to appear that wogification was a factor in this because I tested both "wogified" and "half wogified" on the map where the phoenix health remained at 200 and it had the same result either way.

Maybe the problem is map specific and it's scripted to happen, but this theory wouldn't make sense because I only tested on SoD maps.

Weird, huh? I wish I knew what to do.

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Unread postby Fnord » 15 Aug 2006, 01:41

mr.hackcrag wrote:
Fnord wrote:
Did you WoGify the map? There are some wogify scripts that affect Phoenix Health I think (or at least one--probably Rebalanced Creatures).
None of the options that alter a creatures stats were turned on. Of course, there are so many options, I might have unknowingly missed one, but I don't think so.

I tested three different maps and I found that the phoenix health dropped to 100 on two of the maps and remained at 200 on the other.

It didn't seem to appear that wogification was a factor in this because I tested both "wogified" and "half wogified" on the map where the phoenix health remained at 200 and it had the same result either way.

Maybe the problem is map specific and it's scripted to happen, but this theory wouldn't make sense because I only tested on SoD maps.

Weird, huh? I wish I knew what to do.
I think I found the answer. It is a WoGify script bug and has been corrected in the script updates. Here's a description of the bug:

"The reduction of Phoenix HP (if Enhanced Monsters was not active) became part of the Wyvern Monarch timer and reduced Phoenix hitpoints (as well as increasing Wyvern Monarch HP and Cost increase) on Day 15 and 22. This has been corrected by putting the Phoenix HP reduction back in the Day 1 function that triggers when Rebalanced Creatures (option 37) is turned on and not in the additional Wyvern Monarch timer section."
- Fnord

mr.hackcrag
Round Table Hero
Round Table Hero
Posts: 1525
Joined: 05 Jul 2006

Unread postby mr.hackcrag » 15 Aug 2006, 02:09

Um... I don't really know where the script update section is.

The "rebalanced creatures" option says something like when "enhanced monsters" and "reduce phoenix growth" is not on, phoenix health is reduced 50%. Could an alternative solution be to turn "reduce phoenix growth" on, but have a script or trait file set phoenix growth at 1 per week to over-ride that option.

Or what If I simply remove the code that reduces phoenix health from script 37, will that fix the problem? I guess there's only one way to find out...

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Unread postby Fnord » 15 Aug 2006, 06:02

mr.hackcrag wrote:Um... I don't really know where the script update section is.

The "rebalanced creatures" option says something like when "enhanced monsters" and "reduce phoenix growth" is not on, phoenix health is reduced 50%. Could an alternative solution be to turn "reduce phoenix growth" on, but have a script or trait file set phoenix growth at 1 per week to over-ride that option.

Or what If I simply remove the code that reduces phoenix health from script 37, will that fix the problem? I guess there's only one way to find out...
Maybe..I'm not sure. If you want the beta script updates, join the Yahoo wakeofgods group and send me an email. That might be the better solution. ;)
- Fnord

mr.hackcrag
Round Table Hero
Round Table Hero
Posts: 1525
Joined: 05 Jul 2006

Unread postby mr.hackcrag » 15 Aug 2006, 17:32

I think I might have found another bug. I moved my hero to an AI's undefended castle (empty garrison defense) and instead of capturing the castle, I had to fight a battle with an army that was an exact copy of mine. Even the hero was the same as mine and also had same stats. Any advice for this?


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 7 guests