|
|
blackstomper
Adventuring Hero
Member of the old Wog-team
|
posted March 04, 2013 04:42 PM |
|
|
I just discovered that it IS connected to the Tavern Game erm.
If you remove it from the /Data/s folder and use this;
!?PI;
!!VRv3:S-1; initialize map search
!!UN:U98/4/?v2; get the number of Necropolises on the map
!!DO1/1/v2/1; loop through them
!?FU1;
!!UN:U98/4/-1/3; find the next one
!!CA3:B5/17; forbid it from building a Veil of Darkness
Then it works fine.
It also work if you DO have the Tavern ERM but you get the Weird startup dialog.
But atleast the building is banned, and if there is no solution, so be it. I just remove the "65 wog - tavern gambling game" since I never use it anyway
|
|
JimV
Responsible
Supreme Hero
|
posted March 04, 2013 06:05 PM |
|
Edited by JimV at 18:09, 04 Mar 2013.
|
Although Blackstomper is not listening, I'll repeat the lesson for the sake of others:
Looking in ERM Help at the List of the Claimed, we see that FU1 is listed as claimed (by some WoG script). If we then press Ctrl-F and search for "FU1-", the second hit is:
--------> TAVERN GAMBLING GAME (script13.erm)
Author: Timothy
ERM WoG Option Numbers: 13
Object: enhances Tavern (Object 95)
Functions in this code: FU1-FU2
So using FU1 will conflict with the Tavern Card Game, and we need to use a different, unclaimed FU#. This is easy to do if you have the standard WoG scripts which came with the official "Allinon1.zip" WoG package (just check the List of the Claimed for an unused number), but if you are using other WoG script versions, you have to:
1) Pick a function number.
2) Search all the scripts your map uses for that number.
3) If you get no hits, you can use the number, otherwise go back to 1).
In Era 2, as the Era Manual states, you can press F11 during a game to extract all the scripts that have been loaded via wogification, for searching. There are various text editors which will let you search multiple ASCII files.
(The List of the Claimed in ERM Help could be updated, as it has been for the Dress Code script and a few other additions.)
Note: it does not matter if the Tavern Card Game is disabled in the WoG Settings Menu, all Data/s scripts (for active Mods) are loaded into the map by wogification*. They check the option codes to see if their primary triggers should be executed, but most of them do not also check under secondary triggers such as !?FU.
* exception: unless the mod-maker has supplied a "load only these scripts" file.
P.S. I am going to take this as more anecdotal evidence that people who want to write ERM scripts could save themselves time and frustration by reading ERM Help.
|
|
blackstomper
Adventuring Hero
Member of the old Wog-team
|
posted March 04, 2013 06:20 PM |
|
|
Quote: Although Blackstomper is not listening,
"Funny" that you mistake my lack of knowledge as "ignorance" to your efforts in helping me.
Since I fist choose FU2818, didnt work
Looked at the ERM help as you said, found out it was claimed.
Changed to FU9696, wasnt claimed, but still didnt work.
Used FU1, got it to work but with same "errors"
Looked for text similar to the once shown in the Dialogbox. found it in Tavern Game script. Removed that ERM to see if that indeed was the conflict.
Perhaps I was a bit unclear in my humble ask for help.
To put it blunt,
I know jacksnow about ERM and how it works. Its all jibberish for me when I read it.
Anyway, I got it sorted so thanks again for the help
|
|
JimV
Responsible
Supreme Hero
|
posted March 04, 2013 08:00 PM |
|
|
Sorry for the offense. I thought you weren't listening because I told you what your problem was and how to fix it (three ways to find an unclaimed FU #) two posts ago and you seemed to ignore that.
I should have thought to mention that there are undocumented WoG scripts out there whose interferences are not mentioned in the List of the Claimed. I am sorry for that also.
The rest of my lecture was aimed at persuading people who want to learn ERM that ERM Help was written by the WoG team with them in mind, and contains all the helpful advice and more that I could give. Before I read it I knew nothing about ERM, and every beginner problem/question I have seen here is answered in it. (Specifically, warning about script interferences in the Basic tutorials and in the List of the Claimed section.)
I know (living proof) that by reading ERM Help and practicing anyone who is willing to expend the effort can learn to write working ERM scripts. I assume people who post here want to learn that, but there again my mind-reading skills may be failing me.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted March 04, 2013 09:51 PM |
|
|
@blackstomper, your infos are irrelevant for someone to be able to help. You post a correct script which is not working, so it is clearly about other scripts you use with, it conflicts.
Yet is easy to fix, upload your test map or specify your enabled mods list/wogification settings. I see that in the end you still use FU1 (despite warnings), so why being surprised if not working. Going mad in early erm fails is normal, I know it too well. But it goes better and better over time, for those who keep trying.
____________
Era II mods and utilities
|
|
Sguazz
Known Hero
|
posted March 05, 2013 01:33 AM |
|
|
I am going crazy: I do not understand how to do...
At the day 7 Valeska is in the castle "A", and I want that only in the castle A, the growth of Archers / Marksmen is +20 units. With !!MA:G2/d10; and !!MA:G3/d10; the Growth is applied in every Town... I have tryed also with CA#:M1/$1/$2/$3;...
Is there a correct function?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted March 05, 2013 01:45 AM |
|
|
a) Do a timer run all the castles on the map on every day 1 of the week
b) check if Valeska is in garrison or as visiting hero
c) check if archers dwelling is build
d) if all conditions are ok, add xx archers using M1/$1/$2/$3;
e) store town name to z1 and display message that in town z1 20 horny archers joined their mistress.
NOTE: the special growth will not display in growth box-have to use CM1->ID 173 and it asks further complex calculations-but can be hint tied to Valeska ability, bio or special skills.
____________
Era II mods and utilities
|
|
artu
Promising
Undefeatable Hero
My BS sensor is tingling again
|
posted March 05, 2013 11:05 AM |
|
|
Sal, I am about to pack your Cartographer script as an Era mod (with your name in the ReadMe file of course) yet while testing it on a Hot seat map with 2 players I've noticed these:
1- For the first month it worked as it should, I used it once with player red, then player blue used Cover of Darkness and until month 2 day 1, the Cartographer refused to provide any maps again. Month 2 day 1 it worked, but then, month 2 day 6 it worked again while it should be waiting for the beginning of month 3 to reset again.
2- Normally Cartographers for sea and land are different but with your script the land ones open sea areas too. I don't know if this is intentional so thought I'd mention it.
Thanks for the script again.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted March 05, 2013 11:18 AM |
|
|
There is nothing in script which could make it reset day 6 again. Yeah, JimV suggested to open soils and water separately, I will look into.
|
|
artu
Promising
Undefeatable Hero
My BS sensor is tingling again
|
posted March 05, 2013 11:38 AM |
|
|
Quote: there is nothing in script which could make it reset day 6 again
My guess is there is nothing specific about day 6. After month 1, it just stays open. I could have tried it month 2, day 2 too, I just happened to click on day 6.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted March 05, 2013 12:06 PM |
|
|
Artu I just tested it and it remains closed after visit. Make sure you don't use another mod with TM92, I recall mithril mine uses it.
|
|
artu
Promising
Undefeatable Hero
My BS sensor is tingling again
|
posted March 05, 2013 12:26 PM |
|
|
all other tm92 (mithiril smelter, TEW 3, The Dragon Slaughter) are disabled. Here's what happens:
Cartographer works one time till month 2 day 1.
On Month 2 day 1, it works once, if revisited it's closed.
On month 2 day 2, it works only one more time, then closed again.
On month 2 day 3, it stays closed.
So there is an extra opening on day 2 for some reason, weird. And by earlier testings I can say if you dont use that on day 2, you can in day 6)
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted March 05, 2013 12:35 PM |
|
|
You say you played in hot seat. When you pass turn to second human player, it is still day 1.
|
|
artu
Promising
Undefeatable Hero
My BS sensor is tingling again
|
posted March 05, 2013 12:39 PM |
|
Edited by artu at 12:40, 05 Mar 2013.
|
Quote: You say you played in hot seat. When you pass turn to second human player, it is still day 1.
Yes, I mean day 2 of same red player, player 2 doesnt have cartographer anyway. And as I said, if not used the extra visit can be used on later days.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted March 05, 2013 01:38 PM |
|
|
Here is complete script, each cartographer opens its area. JimV will surely give a faster bit conversion, I did it the old way. Change timer to 7 days delay, don't click 30 times to find out, there was a typo error in first script, current player was bad calculated. Fixed.
ZVSE
!#TM92:S1/999/7/255; [timer 92, every 7 days, all players, change value of reset (28 days)]
!?TM92;
!!VRy1:Sc; [get day]
;run first day
!!if&y1=1:; [only first day]
!!OW:C?y1; [get current player]
!!OW:Iy1/?y2; [get if AI or human]
!!FU&y2<>0:E; [exit if AI]
!!UN:U13/-1/?y-1; [get cartographers number]
!!VRv1:S-1;
!!DO567890/1/y-1/1:P13/y1; [run through each one, fixed y2->y1]
!!en:;
;run every 28 days
!!if&y1>1:; [starting with 28th day]
!!OW:C?y1; [get current player]
!!OW:Iy1/?y2; [get if AI or human]
!!FU&y2<>0:E; [exit if AI]
!!UN:U13/-1/?y-1; [get cartographers number]
!!VRv1:S-1;
!!DO567891/1/y-1/1:P13; [run through each one]
!!en:;
!?FU567890;
;x2 current human player
!!UN:Ux1/-1/-1/1; [cartographer coordinates in v1/v2/v3]
!!OBv1/v2/v3:Dx2; [disable cartographers for human player(s) only]
!?FU567891;
!!UN:Ux1/-1/-1/1; [cartographer coordinates in v1/v2/v3]
!!POv1/v2/v3:N0; [set square value to 0]
!?OB13&1000; [when human visits one]
!!PO998:N?v1; [check square value]
!!IF&v1=15:M^Sorry, we will open next month [add custom text]^;
!!FU&v1=15:E; [exit if square value is 15]
!!OW:R-1/6/?y4; [check gold]
!!IF&y4<1000:M^Sorry, my services cost 1000 gold^;
!!FU&y4<1000:E;
!!UN:X?y1/?y2; [get size of map]
!!OW:C?y3; [check current player]
!!VRy4&y3=0:S1; [get player bits]
!!VRy4&y3=1:S2;
!!VRy4&y3=2:S4;
!!VRy4&y3=3:S8;
!!VRy4&y3=4:S16;
!!VRy4&y3=5:S32;
!!VRy4&y3=6:S64;
!!VRy4&y3=7:S128;
!!OB998:U?y5; get subtype of cartographer
!!DO567892/0/y1/1:Py4/0/y1/y5/y2/0;
!!DO567893/0/y1/1&y2>0:Py4/0/y1/y5/y2/1;
!!OW:R-1/6/d-1000; [take money]
!!IF:M^Opens the map [add custom text]^;
!!PO998:N15; [change square value to 15]
!?FU567892;
;x1 player bits
;x2 starting square
;x3 map size
;x4 cartographer type
;x5 map levels
;x6 open surface
!!DO567894/x2/x3/1:Px16/x1/x4/x5/x6;
!?FU567893;
;x1 player bits
;x2 starting square
;x3 map size
;x4 cartographer type
;x5 map levels
;x6 open underground
!!DO567894/x2/x3/1:Px16/x1/x4/x5/x6;
!?FU567894;
!!TRx1/x16/x6:T?y1/d/d/d/d/d/d/d; [get terrain type]
!!if&x3=1:; [Land cartographer]
!!FU|y1=8/y1=6:E;[exit if water or underground]
!!en:;
!!if&x3=2:; [underground cartographer]
!!FU&y1<>6:E; [exit if not underground]
!!en:;
!!if&x3=0:; [water cartographer]
!!FU&y1<>8:E;
!!en:;
!!TRx1/x16/x6:Vx2; [open map]
@Edit: I found that bit conversion, used it in find me mod:
!!OW:C?v2;
!!VRv2:+550;
!!VRv2:Svv2; convert to player bits
too late:)
____________
Era II mods and utilities
|
|
Friend_of_WOG
Tavern Dweller
|
posted March 05, 2013 08:41 PM |
|
|
Conqueror
Is it possible to add in the hero's name the "conqueror" if you have conquered three castles. Or some other ways to change the hero's name than by level... if it is bossibe... it would be interesting to learn to do that...
|
|
JimV
Responsible
Supreme Hero
|
posted March 05, 2013 09:02 PM |
|
Edited by JimV at 21:12, 05 Mar 2013.
|
ERM Help for HE:B0 says:
------copy and paste from ERM Help----------------
B0/$; Set/get the name of a hero.
If you customize a name but do not set a biography, it will display a hero's default biography, rather than setting it to the same string as the customized name. So if you want to name Orin "Orin II", it will still display Orin's default biography.
------copy and paste ends-------------------------
However, as you can see by editing a Hero's name in the Map Editor, the maximum length of a name that will display is about 14 characters.
There is a WoG option already that lets players rename their Towns and Heroes during a game. See the WoG Options Menu.
P.S. If you are really interested in learning ERM (many who post here are not), read the ERM Help tutorials and do their practice scripts, then read the rest of of ERM Help to get a general idea of what commands are available (especially the Flags and Variables section). Then look at WoG scripts which do something similar, such as the WoG renaming script, and look up each of their commands in ERM Help, line by line, to understand them. If you don't understand a command, try to use it in a test script to find out how it works. When testing, add "debug" statements which display (IF:M) how variables and flags are changing as a script executes. If you still have difficulty understanding something, post your test script here for comments and suggestions. It will be a pleasure to help someone who wants to learn and is willing to work at it.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted March 05, 2013 11:36 PM |
|
|
If you have time and desire, can you please take a look in swap troops from wog revised (Fnord)? It ignores 2 important restrictions, gods and "hero can't live without troops". I fixed to ignore gods ID so the bonus isn't lost or cheated (actually moving them this way kept the bonus on original hero), but for keeping the last creature I have no idea how.
Swap troops
|
|
JimV
Responsible
Supreme Hero
|
posted March 06, 2013 12:22 AM |
|
|
First suggestion: I don't think an automatic choice (by the script) of which troop to keep would please everyone, so I think the player must make the choice, from options such as this:
1) Give A's troops to B, except for slot 1 (leftmost).
2) Give A's troops to B, except for slot 2.
3) Give A's troops to B, except for slot 3.
4) Give A's troops to B, except for slot 4.
5) Give A's troops to B, except for slot 5.
6) Give B's troops to A, except for slot 1 (leftmost).
7) Give B's troops to A, except for slot 2.
8) Give B's troops to A, except for slot 3.
9) Give B's troops to A, except for slot 4.
10) Give B's troops to A, except for slot 5.
11) Swap A and B's troops.
12) Cancel (no change).
That leaves two slots unaccounted for, but only 12 choices are allowed in IF:G.
Or maybe it would be just as easy for the player to always use slot 1 (actually zero) as the unmoved slot, rather than reading and selecting from all those choices.
Anyway, the difficulty is not so much scripting, but deciding what to script. (This is often the case.)
Alternate 3:
1) Give A's troops to B, except for slot 1 (leftmost) and Gods.
2) Give A's troops to B, except for 1 creature of slot 1 and Gods.
3) Give B's troops to A, except for slot 1 (leftmost) and Gods.
4) Give B's troops to A, except for 1 creature of slot 1 and Gods.
5) Swap A and B's troops, except for Gods.
6) Cancel (no change).
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted March 06, 2013 12:50 AM |
|
|
There are already three options and is tedious, HD mod by Baratorch (for sod) uses 3 specific buttons and all is automated, one single creature (lower level) is left. The whole thing has as goal to speed to transfer to instant, therefore having to select between 12 options-read them then think- will be useless and unfriendly.
____________
Era II mods and utilities
|
|
|
|