Map Database  •  FAQ  •  RSS  •  Login

Golden Cliffs + Bonuses!

<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 21 Sep 2014, 20:08

Re: Golden Cliffs + Bonuses!

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
<<

Ben

User avatar

Former Site Admin

Posts: 3814

Joined: 08 Jan 2009, 23:00

Location: California - Pacific Time (UTC -8/-7 Summer Time)

Post 21 Sep 2014, 20:30

Re: Golden Cliffs + Bonuses!

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.
I used to spam this forum so much...
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 22 Sep 2014, 00:09

Re: Golden Cliffs + Bonuses!

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...
You do not have the required permissions to view the files attached to this post.
Last edited by Esthlos on 22 Sep 2014, 08:51, edited 2 times in total.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 22 Sep 2014, 02:05

Re: Golden Cliffs + Bonuses!

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
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 22 Sep 2014, 08:00

Re: Golden Cliffs + Bonuses!

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.
You do not have the required permissions to view the files attached to this post.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

Tiank

User avatar

Knight

Posts: 592

Joined: 15 Sep 2013, 13:11

KaM Skill Level: Skilled

Location: Poland

Post 22 Sep 2014, 11:32

Re: Golden Cliffs + Bonuses!

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 :).
Without honour, victory is hollow.
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 22 Sep 2014, 12:35

Re: Golden Cliffs + Bonuses!

I got a small suggestion about picking the bonuses.[...]
Done, thank you.
You do not have the required permissions to view the files attached to this post.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

Fofoman

Post 22 Sep 2014, 15:56

Re: Golden Cliffs + Bonuses!

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
<<

Tiank

User avatar

Knight

Posts: 592

Joined: 15 Sep 2013, 13:11

KaM Skill Level: Skilled

Location: Poland

Post 22 Sep 2014, 16:21

Re: Golden Cliffs + Bonuses!

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.
Without honour, victory is hollow.
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 27 Sep 2014, 17:56

Re: Golden Cliffs + Bonuses!

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.
You do not have the required permissions to view the files attached to this post.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 04 Oct 2014, 12:25

Re: Golden Cliffs + Bonuses!

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:
You do not have the required permissions to view the files attached to this post.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

Tiank

User avatar

Knight

Posts: 592

Joined: 15 Sep 2013, 13:11

KaM Skill Level: Skilled

Location: Poland

Post 18 Oct 2014, 07:33

Re: Golden Cliffs + Bonuses!

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.
Without honour, victory is hollow.
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 18 Oct 2014, 18:41

Re: Golden Cliffs + Bonuses!

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.
You do not have the required permissions to view the files attached to this post.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 07 Nov 2014, 17:45

Re: Golden Cliffs + Bonuses!

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).
You do not have the required permissions to view the files attached to this post.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 04 Dec 2014, 10:26

Re: Golden Cliffs + Bonuses!

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
You do not have the required permissions to view the files attached to this post.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 5 guests