A few questions about erm

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.

Moderator: Moderators

Pollo2002
Peasant
Peasant
Posts: 96
Joined: 24 Jan 2006

A few questions about erm

Postby Pollo2002 » Apr 26 2006, 2:47

I've reading but i don't seem to find it.
since nobody want the work i offered i will try to do it myself
I'm looking for a way to work on spells but don't seem how.
why the Quick combat system doesn't work on multiplayer? is there anyway to make it work?

User avatar
Fly
Leprechaun
Leprechaun
Posts: 20
Joined: 12 Jun 2006
Location: Russia - Krasnoyarsk
Contact:

Postby Fly » Jun 14 2006, 16:29

May by 3.59 will include this property...
I'm sure that 3.59 will have ability to create or ahange spells!

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

Postby Beholder » Jun 14 2006, 20:54

you can already change spells using Sptraits.txt file. It has tabled info about all spells (like mana, school, damage etc) - you can change it to your liking (I suggest to open it using ERM scripter - you open it and that choose 'reopen as table' it`s very readable then). Then you place your altered file in /data folder and changes are applied to all heroes games (so no option to 'tick' in menu :( ). This file can be extracted from some ingame file - I don`t know which one, or you can try to find it on the net.
You can make some changes uding ERM commands as well (like BH trigger).
It`s hard to tell if any ERM commands will be added to support this in 3.59

I also think that these changes (txt file) can be done without wog and will work on SoD installation (though I`m not sure of this).
Beholder

User avatar
emrysblack
Peasant
Peasant
Posts: 50
Joined: 02 Apr 2006

ERM language

Postby emrysblack » Jun 17 2006, 8:55

As far as I understand it, erm (event related model) is the backbone of wog, yes? Also, it works with values directly stored in the memory? (correct me if I'm wrong) And scripts tend to "conflict" with one another when they use similar flags or memory storage locations?

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

Postby Beholder » Jun 17 2006, 16:11

well I guess that you could say that wog is mostly hard coded options (c++ afaik)+ scripts (erm) + graphics. Anyway erm is one of the most impoertant things in wog.

As for memory - each script uses some variables. Problems are when few scripts use the same variables (fe. one script holds there players gold and other holds number of devils player has - wouldn`t want to mix/swap those :) ). So you have to avoid using variables that are already used. In erm help there is section called 'claimed' - there you can find which variables are used by wog itself (updated with each version) - so these are the vars that were used while making wog scripts - don`t use them. Secondly you may happen to use some custom script - in that case you should check what variables they use and don`t use those variables in your scripts.
Finally there are some special variables (like v1000) which are changed by the game and those variables are read-only purpose and you are free to CHECK what value they have. Fe. v998-v1000 hold hero position on the map. You can check it (fe. display on the screen) but you shouldn`t change them (either nothing will happen, some script will malfuntion or the game will crash).
Beholder

User avatar
emrysblack
Peasant
Peasant
Posts: 50
Joined: 02 Apr 2006

ERM

Postby emrysblack » Jun 17 2006, 18:28

That's what I thought. Isn't there a different way to store variables? possibly a more stable way? For example, instead of writing them directly to the memory, coudn't you put it in a temp file of some sort? Maybe even just a txt file. Each file name (which stores variables for various scripts) would be unique to each script name and thus eliminating (or greatly reducing) crashes due to variables. It can't be that hard. Or can it?

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

Postby Beholder » Jun 17 2006, 19:39

It`s quite an idea... I`ll ask others wether this could be hard coded...
Beholder

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

Re: ERM

Postby Fnord » Jun 17 2006, 20:55

emrysblack wrote:That's what I thought. Isn't there a different way to store variables? possibly a more stable way? For example, instead of writing them directly to the memory, coudn't you put it in a temp file of some sort? Maybe even just a txt file. Each file name (which stores variables for various scripts) would be unique to each script name and thus eliminating (or greatly reducing) crashes due to variables. It can't be that hard. Or can it?


It doesn't sound very practical. If you have to read in the value from a text file each time it's used and write it again each time it's changed, this would certainly slow down the game a LOT. Imagine a loop where you check and change a hundred or more variables every turn..then multiply this by a dozen or more scripts.

Using text files to store information *can* be quite useful, but for the majority of cases, I think the current memory-based variable system is the only practical way to go.

Another issue is that most of the crashes aren't from variable conflicts at all. They're usually from out of range values that have occurred for some reason (the script writer didn't think of or realize a particular situation could occur and didn't put in a check or else simply made an error in the script).

In fact, most wogify script conflicts aren't even due to variable conflicts (it happens on occasion but as a team, I think we're generally pretty careful to avoid this most of the time). Most of the script conflicts are due to one script changing something in a way that affects another script's interaction with the object, event, or information. For example, one script might remove spell points prior to a battle and restore them after. Another script might alter spell points during the battle. A third might change the hero's knowledge permanently. Unless very careful coordination is done, the result of all three changes will probably not be what anyone expects or desires. That's just one example--there are dozens of other situations that are all completely different and have to be dealt with separately.
- Fnord

User avatar
emrysblack
Peasant
Peasant
Posts: 50
Joined: 02 Apr 2006

hmm...

Postby emrysblack » Jun 23 2006, 2:47

How did the original coders (for homm, new world computing I mean) store variables? just curious...

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

Postby Beholder » Jun 23 2006, 13:34

Well I think that the main difference is that in WOG you can`t be sure which variables must be stored in a savegame and which are temporary variables that can be reset each time you run the game. So if you don`t know that it`s safer to save all variables - which takes more place.
That`s what I think about it using only reasonable thoughts :) I guess that Slava could answer this question properly but he`s quite busy so there`s very small hope for this answer ...
Beholder


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 1 guest