Page 4 of 5

Re: Golden Cliffs + Bonuses!

PostPosted: 21 Sep 2014, 20:08
by RandomLyrics
Range check as Lewin said is caused by wrong array reference, u should check your script (procedures and functions where u use arrays ) and turn off things that u suspect it may cause this error, then fix it where u find it.
How u want to do the Berserker Rage by script? Spawn new unit when dies or what ?:P

Re: Golden Cliffs + Bonuses!

PostPosted: 21 Sep 2014, 20:30
by Ben
Can you somehow change the way bonuses are selected? Right now there is some effort involved in changing the script so it works with other maps. I don't know if there are options available to you with the current methods of input though... using console commands would be great but as far as I know, they are not yet possible with scripts.

Also, you should categorize this as a special map! Use "SetSpecial" in the first line of the "Golden Cliffs - Bonus.txt" file.

Re: Golden Cliffs + Bonuses!

PostPosted: 22 Sep 2014, 00:09
by Esthlos
Range check as Lewin said is caused by wrong array reference, u should check your script (procedures and functions where u use arrays ) and turn off things that u suspect it may cause this error, then fix it where u find it.
Would be easier if I didn't use an array every other line... :$
How u want to do the Berserker Rage by script? Spawn new unit when dies or what ?:P
Oh... I was sure I saw a command to change a unit's current HP... my bad.
Can you somehow change the way bonuses are selected? Right now there is some effort involved in changing the script so it works with other maps. I don't know if there are options available to you with the current methods of input though... using console commands would be great but as far as I know, they are not yet possible with scripts.
Argh... all right, now the script should be completely independent from the map. :wink:
You should be able to copy and paste it and have it work already. :D
(Just remember to copy the .libx files too... :P )

To choose a bonus, you now have to plan a house wherever you want.

Updated the in-game messages to say which house means which bonus.
Also, you should categorize this as a special map! Use "SetSpecial" in the first line of the "Golden Cliffs - Bonus.txt" file.
Did it now, but it seems to be changing nothing...

Re: Golden Cliffs + Bonuses!

PostPosted: 22 Sep 2014, 02:05
by Lewin
Would be easier if I didn't use an array every other line... :$
In the next RC it will tell you which function/procedure the error occurred in :) That should help you. Unfortunately I couldn't get it to show the line number.
Also, you should categorize this as a special map! Use "SetSpecial" in the first line of the "Golden Cliffs - Bonus.txt" file.
Did it now, but it seems to be changing nothing...
Delete the .mi file. Sometimes it caches the old value if you only change the .txt file.

Also, a suggestion with your translations: Change it from this:
" chose to have Engineering!|"
to this:
"%s chose to have Engineering!|"
Then use the command OverlayTextAppendFormatted. It's explained in more detail here:
https://code.google.com/p/castlesand/wi ... -_advanced
This gives the translator more control, since some languages might need to write something like: "The choice of Lewin was Engineering".

Also, see what I wrote here about the overlay:
viewtopic.php?f=23&t=853&p=40721#p40721

Re: Golden Cliffs + Bonuses!

PostPosted: 22 Sep 2014, 08:00
by Esthlos
Also, you should categorize this as a special map! Use "SetSpecial" in the first line of the "Golden Cliffs - Bonus.txt" file.
Did it now, but it seems to be changing nothing...
Delete the .mi file. Sometimes it caches the old value if you only change the .txt file.
It worked! :D
Also, a suggestion with your translations: Change it from this:
" chose to have Engineering!|"
to this:
"%s chose to have Engineering!|"
Then use the command OverlayTextAppendFormatted. It's explained in more detail here:
https://code.google.com/p/castlesand/wi ... -_advanced
This gives the translator more control, since some languages might need to write something like: "The choice of Lewin was Engineering".

Also, see what I wrote here about the overlay:
viewtopic.php?f=23&t=853&p=40721#p40721
Done, thank you.

Re: Golden Cliffs + Bonuses!

PostPosted: 22 Sep 2014, 11:32
by Tiank
I got a small suggestion about picking the bonuses. It seems odd to me, that you set e.g. Mill for Sniper. Why? I don't see any connection between the bonus and a house. It should be intuitive for player. So here's my suggestion for houses:
Master Crafters - Weapon Smithy is okay, but maybe Iron Smithy would fit better?
Tough People - Barracks, since Barbarians are extremely strong warriors and those two swords in image can be easily connected with them :)
Rich - nothing would fit better, than Metallurgist's :)
Snipers - Watchtower, as usually sniper sits in some kind of high, hard to reach place
Demolishers - it's hard to pick good house, maybe Weapon Workshop, since the hammer might have something to do with demolishing houses...
Explorers - Stable fits well
Survivalists - Inn - perfect
Engineering - Sawmill, cause it's weird, that you could pick school, since it's one of two buildings, that are available to build only after you choose bonus (school and storehouse). I'm afraid, it might be confusing and that saw in Sawmill's image kinda suggest, that bonus is related with building things.

Also, consider putting bonuses in different order, I mean: let Survivalists be first in order, cause Inn is the first building in Houses Picking interface, then Engineering, cause Sawmill is second, then Rich, cause Metallurgist's is third in order, and so on. I think it would be easier to pick the bonus you want, instead of looking all around the interface :).

Re: Golden Cliffs + Bonuses!

PostPosted: 22 Sep 2014, 12:35
by Esthlos
I got a small suggestion about picking the bonuses.[...]
Done, thank you.

Re: Golden Cliffs + Bonuses!

PostPosted: 22 Sep 2014, 15:56
by Fofoman
Tough People - Barracks, since Barbarians are extremely strong warriors and those two swords in image can be easily connected with them :)
Rich - nothing would fit better, than Metallurgist's :)
I would even like to see the Townhall. Then really everyone will get what´s meant. Barracks can also mean stronger bowmen :P you can place the townhall like every other building, only difference is that you cannot use it, but that´s good in this mission :D


Fofoman

Re: Golden Cliffs + Bonuses!

PostPosted: 22 Sep 2014, 16:21
by Tiank
I would even like to see the Townhall.
But for now it's not possible to make Town Hall pickable by Houses' Interface. As far as I know, it can be only added by script.

Re: Golden Cliffs + Bonuses!

PostPosted: 27 Sep 2014, 17:56
by Esthlos
Updated the script to use the new States.LocationCount function of RC3.

By the way, I think that Master crafters feels pretty weak... maybe the ratio could be increased?

Also, now that the map has been tested a little I'm curious to know if in your opinion Snipers could use a buff (maybe 33% kill chance on Attack instead of on Wounding?) and if Demolishers can be changed to Green Thumb.

Re: Golden Cliffs + Bonuses!

PostPosted: 04 Oct 2014, 12:25
by Esthlos
Slowly, but I'm actually learning how to code! :D

Today, I learned that there actually is the function SetLength... it's useful, and this script now includes it. :mrgreen:

Re: Golden Cliffs + Bonuses!

PostPosted: 18 Oct 2014, 07:33
by Tiank
There's someting wrong with the wares' distribution... Check it out, it shows at start, that you can't distribute coal to Iron Smelter or Metallurgist's, but when a player is able to build these houses, everything's back to normal. Same goes with distribution for Weapon Workshop, Mill and Stable (I chose Survivalists).

Only Engineering seems to be okay with that. All other bonuses have this bug.

Suggestion for Explorers - maybe they could have unlocked Farm earlier (after Inn maybe), so you can get even more horses.
About buffing Snipers - that's a good idea, worth trying. Right now it's hard to tell the difference between normal mass bowmen and buffed mass bowmen...

After played few games with this bonus, it seems, that Survivalists is very powerful bonus. That's why other bonuses need some boost for sure, maybe except the Engineering bonus, since it seems to be good enough.

EDIT: About Master Crafters - just an idea, what about double production ratio for some production buildings (Sawmill, Mill, Swine Farm, Metallurigst's, Iron Smithy). Then they will be really Masters in what they do ;).
And Demolishers should be replaced with some fighting bonus imo.

Re: Golden Cliffs + Bonuses!

PostPosted: 18 Oct 2014, 18:41
by Esthlos
In v1-12 is included a PDF with a basic description of the bonuses, made by Tiank.
Thanks!
There's someting wrong with the wares' distribution... Check it out, it shows at start, that you can't distribute coal to Iron Smelter or Metallurgist's, but when a player is able to build these houses, everything's back to normal. Same goes with distribution for Weapon Workshop, Mill and Stable (I chose Survivalists).

Only Engineering seems to be okay with that. All other bonuses have this bug.
That's inevitable, I fear... in order to hide the buildings after a choice has been made, I had to use HouseAllow, because as far as I know there is no HouseLock command.
Suggestion for Explorers - maybe they could have unlocked Farm earlier (after Inn maybe), so you can get even more horses.
About buffing Snipers - that's a good idea, worth trying. Right now it's hard to tell the difference between normal mass bowmen and buffed mass bowmen...

After played few games with this bonus, it seems, that Survivalists is very powerful bonus. That's why other bonuses need some boost for sure, maybe except the Engineering bonus, since it seems to be good enough.

EDIT: About Master Crafters - just an idea, what about double production ratio for some production buildings (Sawmill, Mill, Swine Farm, Metallurigst's, Iron Smithy). Then they will be really Masters in what they do ;).
And Demolishers should be replaced with some fighting bonus imo.
Nice... done, thank you.

Everybody's been buffed except Engineers and Survivalists:
  • Explorers have the Farm unlocked after the Inn.
  • Explorers' horses now cost half the normal Corn amount.
  • Snipers now get their bonus on attack instead of on wounding - this is a massive buff, so the chance is reduced to 15%.
  • Tough people now can make axes at the normal price, but need 2 Axes to equip 1 Militia.
  • Rich have their starting Gold restored and can mine for (and sell) it.
  • Demolishers are now named "Retribution", can be chosen with the Market and their bonus is a passive 5% chance to kill any unit that attacked them.
  • Master Crafters now get 50% increased Weapon and Armor production.

Re: Golden Cliffs + Bonuses!

PostPosted: 07 Nov 2014, 17:45
by Esthlos
Thanks koczis12 for the permission to use your map!

I'm attaching v1-13, where
  • Player names are now color coded.
  • It is now possible to easily choose between the new, faster, build order included in KaM
    Remake and the classic, slower, one, by editing the script (changing the boolean
    “aEnableOldBuildOrder” in OnMissionStart).

Re: Golden Cliffs + Bonuses!

PostPosted: 04 Dec 2014, 10:26
by Esthlos
Hi everyone!
It's been a while since v1-00, and (with some very valuable help) I've learned so much since then... so, I decided to rewrite the code.
It's longer now in v2-00 than in v1-13, but it's tidier and should also be lighter and more efficient.

This is pretty much the only change. I didn't touch texts (well, fixed a typo in the italian translation, but that doesn't count :P ), nor the map, nor anything else than the whole code. :P