I've been playing with scripts and learning a TON. I've made dozens of modifications, and I've even added a few simple scripts to the Wog options page. Now it's time to build a campaign. And the fun begins.
The following timed event crashes my game. I set the time to day 500, removed both players from the event and set the event to only show to computer players as the documentation and tutorials say. I've read and re-read the OW receiver and cannot figure out WHAT I am doing wrong...
I'm not using variables, and I've even changed the instructions to receivers and set the event for day one instead. That stops it from crashing but still disables the script due to "Syntax".
And I am using the scripting editor to write the script and copy/pasting it into the event.
ZVSE
ERMS_ScriptDate=8.11(November).2006
_WARNING_#1=IMPORTANT! This file is not in a plain text format. NEVER use any editor except ERM_S for making any kind of changes!
ERMS_PoweredBy=ERM Scripter v. 2005.9.7.814
!#OW:R0/0/1; Remove most funds from Player 1 (Red)
!#OW:R0/1/1;
!#OW:R0/2/1;
!#OW:R0/3/1;
!#OW:R0/4/1;
!#OW:R0/5/1;
!#OW:R0/6/1000;
Quoted straight from the help on OW: "You can use a set style Ri/3/1000"
Am I missing something overly simple?
Problem with script setting resources.
Some ERM commands simply don't work as instructions. A few won't even work with the post-instruction trigger (!?PI;).
In this case, I think it's impossible to set resources prior to a day 1 timer without the game crashing.
I tested it using a day one timer and it worked fine without any crash or syntax errors.
In this case, I think it's impossible to set resources prior to a day 1 timer without the game crashing.
I tested it using a day one timer and it worked fine without any crash or syntax errors.
- Fnord
Well I solved my problem with the GE Trigger and a Day1 event for the computer player.
I was unable to get the script to work with any of the following methods, and perhaps I am doing something wrong, if so, I can't figure out what it is.
Day 1 event - Didn't work
Day 1 Timer - Timer didn't trigger on Day 1
Instructions - Script error, obviously resources cannot be set on map load.
PI Trigger - Same as above, resources just cannot be set prior to day 1.
Erm.hlp stated that Timers do not work on Day 1.
I have however seen them being used on Day 1 (in wogify scripts, which may very well be handled differently), and they work. In my case the help was right.
However, the above quoted paragraph did get me back to the GE Trigger which strangely enough had an example of almost exactly what I wanted to do. I apologize for missing that originally and posting for help.
I had read the help and had gone through all of the triggers and receivers several weeks ago, but I have primarily been using examples in the wogify scripts as my guide, and appropriately, Alexis' Script40.erm for this particular case.
I was unable to get the script to work with any of the following methods, and perhaps I am doing something wrong, if so, I can't figure out what it is.
Day 1 event - Didn't work
Day 1 Timer - Timer didn't trigger on Day 1
Instructions - Script error, obviously resources cannot be set on map load.
PI Trigger - Same as above, resources just cannot be set prior to day 1.
Erm.hlp stated that Timers do not work on Day 1.
The TM Timer will not activate properly on the very first day when a map is played, so if you want ERM code (receivers) to do something on the very first day, it is better to link them to something else such as a local event or a day 1 general (timed) event.
I have however seen them being used on Day 1 (in wogify scripts, which may very well be handled differently), and they work. In my case the help was right.
However, the above quoted paragraph did get me back to the GE Trigger which strangely enough had an example of almost exactly what I wanted to do. I apologize for missing that originally and posting for help.
I had read the help and had gone through all of the triggers and receivers several weeks ago, but I have primarily been using examples in the wogify scripts as my guide, and appropriately, Alexis' Script40.erm for this particular case.
It's true that the TM timer didn't work properly on day 1 in an earlier version of WoG/ERM but it was fixed (I don't recall which version) and works correctly in 3.58f. It's the ERM help that's wrong and out of date.
If you want to post the code you used for setting up your timer and the timer trigger, etc. I can tell you if there's a problem there.
And yes, the GE trigger and receiver is another way to do it, although that's only possible to use in custom maps and not with wogify scripts (for obvious reasons). I'm glad you got your code working finally.
If you want to post the code you used for setting up your timer and the timer trigger, etc. I can tell you if there's a problem there.
And yes, the GE trigger and receiver is another way to do it, although that's only possible to use in custom maps and not with wogify scripts (for obvious reasons). I'm glad you got your code working finally.
- Fnord
Thanks Fnord, How do I tell which version of 3.58 I am using? Because the day 1 timer definitely does not work.
As far as code, I used what I already posted above (changed them back to receivers instead of instructions). Used the trigger:
?!TM25;
At the top of the previously posted script.
Then, I set an instruction to set the timer:
!#TM25:S1/1/999/255;
As far as code, I used what I already posted above (changed them back to receivers instead of instructions). Used the trigger:
?!TM25;
At the top of the previously posted script.
Then, I set an instruction to set the timer:
!#TM25:S1/1/999/255;
To check WoG version, when you start the game, right-click on the Credits button on the main screen. It should say 3.58f if it's 3.58f (Built on Oct 24 2004, ERM 2.8.1)Arkas wrote:Thanks Fnord, How do I tell which version of 3.58 I am using? Because the day 1 timer definitely does not work.
As far as code, I used what I already posted above (changed them back to receivers instead of instructions). Used the trigger:
?!TM25;
At the top of the previously posted script.
Then, I set an instruction to set the timer:
!#TM25:S1/1/999/255;
For the timer, try changing it to !#TM25:S1/1/1/255; instead -- I'm not sure if it works properly if you set a higher increment than the end date.
- Fnord
Ok well I'm not sure how that happened, I could have sworn I downloaded the latest and greatest, but unfortunately not. I still have 3.58, without the "f".
So to my next question. If I go and download 3.58f, will it install over my 3.58 without problems, and which files do I need to back up if any? (I do have custom scripts in the \s folder, and I'm not concerned about other wog files (other than my current custom map).
So to my next question. If I go and download 3.58f, will it install over my 3.58 without problems, and which files do I need to back up if any? (I do have custom scripts in the \s folder, and I'm not concerned about other wog files (other than my current custom map).
It will usually install fine over a previous version but not always. If you want to be safe, reinstall Heroes from scratch. Or you can try it and if it works, that's great, and if it fails to install, then reinstall from scratch.Arkas wrote:Ok well I'm not sure how that happened, I could have sworn I downloaded the latest and greatest, but unfortunately not. I still have 3.58, without the "f".
So to my next question. If I go and download 3.58f, will it install over my 3.58 without problems, and which files do I need to back up if any? (I do have custom scripts in the \s folder, and I'm not concerned about other wog files (other than my current custom map).
What I do is install SoD+AB and then instead of installing WoG over it, I copy and paste the whole SoD folder and install WoG on that. Then if I ever need to install WoG again, I can just do the same thing.
As for backups, yes, backup your Data\s folder and maps, etc. If there are no other files, you won't need to backup anything else. If you have custom WoG Option settings, you could back those up too but it's usually not a big deal to go back in and choose what you want. Of course, if you want to be completely safe, you could backup everything, just in case there's anything you did want to keep that you're forgotten about.
- Fnord
Who is online
Users browsing this forum: No registered users and 11 guests