|
|
fersch
Known Hero
Heral knight
|
posted August 19, 2011 02:08 PM |
|
|
Well im trying to replace the satyr from grove but satyr isnt in the defka list.. so do i replace gnoll and gnoll marauder?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted August 19, 2011 02:16 PM |
|
|
There is no such thing as satyr in Heroes. Any mod has afaik to replace creatures, while the original defs names are kept. First you have to know what creature the satyr replaced, then replace that one. Probably gnolls.
____________
Era II mods and utilities
|
|
fersch
Known Hero
Heral knight
|
posted August 19, 2011 02:19 PM |
|
|
Thank you, should map and battle DEF be the same file?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted August 19, 2011 02:24 PM |
|
|
|
fersch
Known Hero
Heral knight
|
posted August 19, 2011 02:35 PM |
|
|
Well do you know what i put where?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted August 19, 2011 02:38 PM |
|
|
If you have both defs to replace, usually the bigger is the battle def and the smaller is the map def. Check the sizes and insert the right ones...
____________
Era II mods and utilities
|
|
fersch
Known Hero
Heral knight
|
posted August 19, 2011 02:52 PM |
|
|
Yes! it worked thank you so much!
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted August 19, 2011 03:13 PM |
|
|
@Alee
You were right. The script didn't work on more than one Castles. The commands you suggested on changing did the trick. I tested it on four Castles and it worked.
As for the Rampart i made it work to. I already did most of the bold changes you pointed out but i was missing this little thing:
!!UN:U98/1/x16/1;
And it messed the whole script. Now both Castle and Rampart have third slots without any problems. I pray i don't get any other hardships with this script.
In addition, i managed to make the script add third slot for the Portal of Glory too. Here is the script:
****third slots
!#TM21:S8/999/7/1; //1st day timer
//already existing dwellings
!?PI;
!!UN:U98/0/?i; //searching for all castles
!!FU&i=0:E;
!!DO25665/1/i/1:P;
!?FU25665; //searching for all castles
!!UN:U98/0/x16/1;
!!CA1:T?y-1 B3/42; //if upgraded Training ground is built
!!CA1&y-1=0/1:M1/5/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D5/2/165/i; //set our creatures' number accordingly
!!CA1:T?y-1 B3/43; //if upgraded Portal of Glory is built
!!CA1&y-1=0/1:M1/6/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D6/2/169/i; //set our creatures' number accordingly
//newly built dwellings
!?TH0; //on entering City hall
!!IF:V598/0; //set flag 598 to false
!!CA-1:T?y-1 B3/42; //check whether Training ground is built
!!IF&-1:V598/1; //if no, set 598 to true
!!IF:V599/0; //set flag 599 to false
!!CA-1:T?y-1 B3/43; //check whether Training ground is built
!!IF&-1:V599/1; //if no, set 599 to true
!?TH1&598; //on leaving City hall + 598 is true
!!CA-1:T?y-1 B3/42; //check whether Training ground has just been built
!!CA1&y-1=0/1:M1/5/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D5/2/165/i; //set our creatures' number accordingly
!?TH1&599; //on leaving City hall + 598 is true
!!CA-1:T?y-1 B3/43; //check whether Portal of Glory has just been built
!!CA1&y-1=0/1:M1/6/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D6/2/169/i; //set our creatures' number accordingly
//growth
!?TM21; //every monday
!!UN:U98/0/?i; //same search as above
!!FU&i=0:E;
!!DO25666/1/i/1:P;
!?FU25666;
!!UN:U98/0/x16/1;
!!CA1:T?y-1 B3/42;
!!CA1:T?y-2 B3/43;
!!FU&y-1<>0|-1:E; //checks for town type and dwelling status
!!CA1&y-1=0/1:M1/5/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D5/2/165/i; //set our creatures' number accordingly
!!FU&y-2<>0|-1:E; //checks for town type and dwelling status
!!CA1&y-2=0/1:M1/6/d/?i; //get current number of standard creatures
!!CA1&y-2=0/1:D6/2/169/i; //set our creatures' number accordingly
!?CM1; //every click in a city
!!CA-1:T?y-1 B3/42;
!!CA-1:T?y-2 B3/43;
!!FU&y-1<>0|-1:E; //check for town type and dwelling status
!!CA-1:M1/5/d/?i; //get number of standard creatures available
!!CA-1:D5/2/165/?j; //get number of our creatures available
!!CA-1&j<i:M1/5/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D5/2/165/i; //vice versa
!!FU&y-2<>0|-1:E; //check for town type and dwelling status
!!CA-1:M1/6/d/?i; //get number of standard creatures available
!!CA-1:D6/2/169/?j; //get number of our creatures available
!!CA-1&j<i:M1/6/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D6/2/169/i; //vice versa
!?FU88888;
!!CA-1:T?y-1 B3/42;
!!CA-1:T?y-2 B3/43;
!!FU&y-1<>0|-1:E; //check for town type and dwelling status
!!CA-1:M1/5/d/?i; //get number of standard creatures available
!!CA-1:D5/2/165/?j; //get number of our creatures available
!!CA-1&j<i:M1/5/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D5/2/165/i; //vice versa
!!FU&y-2<>0|-1:E; //check for town type and dwelling status
!!CA-1:M1/6/d/?i; //get number of standard creatures available
!!CA-1:D6/2/169/?j; //get number of our creatures available
!!CA-1&j<i:M1/6/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D6/2/169/i; //vice versa
By copying - pasting the parts that check the building number and population growth you can make this script work for every single dwelling in town.
____________
Not idly do the leaves of Lorien fall.
|
|
OxFEA
Promising
Famous Hero
feanor on DF2.ru
|
posted August 19, 2011 03:31 PM |
|
|
Quote:
!!CA-1:T?y-1 B3/42;
!!CA-1:T?y-2 B3/43;
Result of B3/43 will overwrite result of B3/42.
Also, y-1 and y-2 will keep the same value
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted August 19, 2011 03:59 PM |
|
|
Is there any way to make the editor take new graphics from H3custom.lod?
So far the games take them, but editor never.
____________
Era II mods and utilities
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted August 19, 2011 04:43 PM |
|
|
@OxFEA
You're right. I edited it a bit but stuck on the entering the City Hall check. I tried this (and other combinations) and it didn't work:
!?TH0; //on entering City hall
!!IF:V598/0; //set flag 598 to false
!!CA-1:T?y-1 B3/42; //check whether Training ground is built
!!IF&-1:V598/1; //if no, set 598 to true
!?TH1&598; //on leaving City hall + 598 is true
!!CA-1:T?y-1 B3/42; //check whether Training ground has just been built
!!CA1&y-1=0/1:M1/5/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D5/2/165/i; //set our creatures' number accordingly
!?TH0; //on entering City hall
!!IF:V599/0; //set flag 599 to false
!!CA-1:T?y-2 B3/43; //check whether Portal of Glory is built
!!IF&-1:V599/1; //if no, set 599 to true
!?TH1&599; //on leaving City hall + 599 is true
!!CA-1:T?y-2 B3/43; //check whether Portal of Glory has just been built
!!CA1&y-2=0/1:M1/6/d/?i; //get current number of standard creatures
!!CA1&y-2=0/1:D6/2/169/i; //set our creatures' number accordingly
Can you point to me where the problem is?
____________
Not idly do the leaves of Lorien fall.
|
|
fersch
Known Hero
Heral knight
|
posted August 19, 2011 04:46 PM |
|
|
If you replace a creature with a def file, does that creature still have the same stats even though it looks different?
|
|
FallenAngel
Hired Hero
Erathia Guard
|
posted August 19, 2011 04:51 PM |
|
|
fersch, def file contains only graphics
|
|
fersch
Known Hero
Heral knight
|
posted August 19, 2011 04:59 PM |
|
|
Quote: fersch, def file contains only graphics
Thank you, is there anyway to change the stats manually?
|
|
OxFEA
Promising
Famous Hero
feanor on DF2.ru
|
posted August 19, 2011 05:00 PM |
|
Edited by OxFEA at 17:12, 19 Aug 2011.
|
Quote: on the entering the City Hall check
Is this check necessary?
Add check for "if j=-2 (third slot doesn't initialzed) then j=i" to !?CM1 and !?FU88888 and remove TH triggers
Something like:
[smileys]
!!CA-1:M1/6/d/?i; //get number of standard creatures available
!!CA-1:D6/2/169/?j; //get number of our creatures available
!!CA-1&j=-2:D6/2/169/i;
!!CA-1&j<i:M1/6/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D6/2/169/i; //vice versa
Quote: Thank you, is there anyway to change the stats manually?
May be you should read some manuals? It is not so difficult and much, much faster and interesting than waiting of answer.
|
|
FallenAngel
Hired Hero
Erathia Guard
|
posted August 19, 2011 05:03 PM |
|
|
fersch, you can change stats in zcrtrait.txt. You can find it in Data folder or in h3bitmap.lod.
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted August 19, 2011 05:19 PM |
|
|
@OxFEA
I think it is. Because now when i build the upgraded version of the building the two original units are reset to -2 growth while the third one is the only that works ok. But if i don't buy it and revisit the dwelling then all three are set to -2 so... Is this what you meant?
!#TM21:S8/999/7/1; //1st day timer
//already existing dwellings
!?PI;
!!UN:U98/0/?i; //searching for all castles
!!FU&i=0:E;
!!DO25665/1/i/1:P;
!?FU25665; //searching for all castles
!!UN:U98/0/x16/1;
!!CA1:T?y-1 B3/42; //if upgraded Training ground is built
!!CA1&y-1=0/1:M1/5/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D5/2/165/i; //set our creatures' number accordingly
!!CA1:T?y-1 B3/43; //if upgraded Portal of Glory is built
!!CA1&y-1=0/1:M1/6/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D6/2/169/i; //set our creatures' number accordingly
//growth
!?TM21; //every monday
!!UN:U98/0/?i; //same search as above
!!FU&i=0:E;
!!DO25666/1/i/1:P;
!?FU25666;
!!UN:U98/0/x16/1;
!!CA1:T?y-1 B3/42;
!!FU&y-1<>0|-1:E; //checks for town type and dwelling status
!!CA1&y-1=0/1:M1/5/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D5/2/165/i; //set our creatures' number accordingly
!!CA1:T?y-1 B3/43;
!!FU&y-1<>0|-1:E; //checks for town type and dwelling status
!!CA1&y-1=0/1:M1/6/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D6/2/169/i; //set our creatures' number accordingly
!?CM1; //every click in a city
!!CA-1:T?y-1 B3/42;
!!FU&y-1<>0|-1:E; //check for town type and dwelling status
!!CA-1:M1/5/d/?i; //get number of standard creatures available
!!CA-1:D5/2/165/?j; //get number of our creatures available
!!CA-1&j=-2:D5/2/165/i;
!!CA-1&j<i:M1/5/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D5/2/165/i; //vice versa
!!CA-1:T?y-2 B3/43;
!!FU&y-2<>0|-1:E; //check for town type and dwelling status
!!CA-1:M1/6/d/?i; //get number of standard creatures available
!!CA-1:D6/2/169/?j; //get number of our creatures available
!!CA-1&j=-2:D6/2/169/i;
!!CA-1&j<i:M1/6/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D6/2/169/i; //vice versa
!?FU88888;
!!CA-1:T?y-1 B3/42;
!!FU&y-1<>0|-1:E; //check for town type and dwelling status
!!CA-1:M1/5/d/?i; //get number of standard creatures available
!!CA-1:D5/2/165/?j; //get number of our creatures available
!!CA-1&j=-2:D5/2/165/i;
!!CA-1&j<i:M1/5/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D5/2/165/i; //vice versa
!!CA-1:T?y-2 B3/43;
!!FU&y-2<>0|-1:E; //check for town type and dwelling status
!!CA-1:M1/6/d/?i; //get number of standard creatures available
!!CA-1:D6/2/169/?j; //get number of our creatures available
!!CA-1&j=-2:D6/2/169/i;
!!CA-1&j<i:M1/6/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D6/2/169/i; //vice versa
____________
Not idly do the leaves of Lorien fall.
|
|
fersch
Known Hero
Heral knight
|
posted August 19, 2011 08:30 PM |
|
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted August 19, 2011 09:35 PM |
|
|
Well, it's a pity but i think i'll be abandoning this third slot script. None of the version i posted doesn't work when the buildings aren't built to begin with. When i start a game and build my way to the Training grounds it gives me an ERM error saying that:
!!CA isn't a castle and then posts the script from the begining
And so the recruits are rendered to -2 and what i don't know what else. It's a pity because when all the buildings are build the script works perfectly (for other Castle towns, for statue of Legion, for Rampart, you name it). There must be something wrong with the dwelling building checking thing i don't know.
Anyway, if anyone can (and is willing) to make this work i would appreciate it if he shares it.
____________
Not idly do the leaves of Lorien fall.
|
|
Aleee
Known Hero
|
posted August 19, 2011 10:09 PM |
|
Edited by Aleee at 22:30, 19 Aug 2011.
|
I'm almost sure that in my version with Town Hall checks everything should be OK.
And you have to be more specific. When exactly do you have the error: after clicking, building, growth, etc.
|
|
|