Map Database  •  FAQ  •  RSS  •  Login

Golden Cliffs + Bonuses!

<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 14 Sep 2014, 22:33

Golden Cliffs + Bonuses!

I modified the map Golden Cliffs, adding 8 bonuses you can choose from:
  1. "Survivalists": your units are never hungry. Ever. Quarry is unlocked after building the School house.
  2. "Engineering": every building is unlocked from the start, and Laborers take half the usual time to build them.
  3. "Rich": endless gold in Schoolhouses (and only there), and you get double the normal amount of wares from trading.
  4. "Explorers": your soldiers and Towers have double the usual vision range, breeding your horses costs 2 Corn instead of 4 per Horse, and occupied buildings get repaired over time. I made sure that Towers are still destructible while self-repairing.
  5. "Master crafters": Armor and Weapon production is increased by 50%.
  6. "Tough people": you train Barbarians instead of Militia, but need 2 Hand Axes to train them.
  7. "Snipers": your ranged units have 15% chance to kill their target in a single arrow/bolt.
  8. "Retribution": whenever a soldier attacks your units, there is a 5% chance per hit that he is the one who dies instead.
The instructions on how to choose and a reminder of the bonuses are presented in-game as messages.

Any feedback pwease?

EDIT: I'm attaching the new file(s) here too.

EDIT2: Since I've been uploading every new file here too and nobody complained, I'm adding a changelog too, for future reference. :P

EDIT3: There is a limit of 12 attachments per post, so I'm deleting the oldest version as I add the new one.

Changelog:
v2-01:
  • Removed three meaningless checks.
  • AI players can now recruit Barbarians at the same cost of a Militia, in order to overcome a conflict between their programmed behaviour and this map's script.
v2-00 :
  • Rewritten, for a tidier, lighter and more efficient code. Hopefully.
v1-13 :
  • 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).
v1-12 :
  • 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.
v1-11 :
  • Script updated to use the function SetLength.
v1-10 :
  • Script updated for KaM Remake RC3.
v1-9 :
  • Changed the order in which the bonuses are presented.
  • Changed some of the buildings to be planned when choosing a bonus.
v1-8 :
  • Deleted the .mi file, now SetSpecial works.
  • Fixed translation files.
  • Overlay texts now refresh every 15 seconds.
v1-7 :
  • The script should now be independent from the map and easily exportable. Remember to copy the .libx files too!
  • Added SetSpecial to the map's description file, nothing seems to be changed though.
  • To choose a bonus, you now have to plan a building.
v1-6 :
  • Bugfix: for Demolishers and Snipers, the script now checks for the involved units/buildings to exist and be alive/not destroyed.
  • To prevent cheating, the Storehouse is now disabled too until a bonus is chosen.
v1-5 :
  • Explorers now have a x2 Line of Sight bonus on soldiers and Towers.
  • Bugfix: Engineers now actually get their x2 construction speed bonus.
v1-4 :
  • Explorers no longer see the whole map.
  • Explorers now only need 3 Corn to breed Horses instead of 4.
  • Survivalists no longer get 2 Skins instead of 1 Pig + 1 Skin from Swine Farms.
  • Allies now get an overlay message stating what did you choose.
v1-3 :
  • Tough people now don't trade Axes, and need 8 Timber to produce one.
  • Rich now starts with no Gold and won't mine for it.
  • Survivalists now start with no food and won't produce any.
  • Survivalists now get 2 Skins instead of 1 Pig + 1 Skin from Swine Farms.
v1-2 :
  • Second batch of the readability fixes.
  • Master crafters now only convert Coal when they need it.
  • Bugfix: soldiers-bonus-placeholders are now added through script, and can now be removed regardless of where the player managed to move them.
v1-1 :
  • First batch of the readability fixes.
  • For Master crafters, Weapon and Armor smithies are now unlocked after Tannery.
  • AIs now get to choose a bonus too.
v1-0 :
  • Original version.
[/list]
You do not have the required permissions to view the files attached to this post.
Last edited by Esthlos on 08 Dec 2014, 12:55, edited 33 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 15 Sep 2014, 06:36

Re: Golden Cliffs + Bonuses!

That looks like an awesome script. Hard to balance though. My suggestions:

1. Rather than using an Integer for the bonus type, make an enumerated type:
  Code:
type TBonusType = (btNone, btCrafters, btTough, btRich, btSnipers, btDemolishers, btExplorers, btSurvivalists, btEngineering);
Then you can replace all of the numbers with those names. Your code will be 10x more readable and less prone to errors :)

2. Move the text to a LIBX file for translations (more info here)

3. You seem to be lazy with variable names, for example in OnTick the variable "hunger" is used for everything. There's no performance penalty to defining lots of variables, so there's no need for this. If OnTick is getting too big remember you can split it.
<<

Tiank

User avatar

Knight

Posts: 592

Joined: 15 Sep 2013, 13:11

KaM Skill Level: Skilled

Location: Poland

Post 15 Sep 2014, 07:32

Re: Golden Cliffs + Bonuses!

Wow, that's a great idea! But at the same time it needs A LOT of rebalancing.

E.g. Tough People - maybe it will be more balanced, if you need to have 4 axes (in Barracks) and selected militia to have one Barbarian. Then at 60 PT you would get around 10-15 of them, which seems okay at first glance. But having one Barb for one Militia is waaay OP for sure.
Rich - hm, seems OP as well, since you could trade gold from Metallurgist's for sth else and have a huuuge boost in economy. I can't see now how it could be nerfed though...
Demolishers - hey! You didn't wrote here, that they have higher chance to miss :D. Well, in future you should make a short pdf with instructions about bonuses.
Explorers - needs testing for sure. Imo, whole map should be revealed after some time, so you can't peek what other players are choosing as a bonus, it would be really useful.

How does the "Master Crafters" exactly work? While selecting it, I got +10 coal and -10 wood at start (and that's bad imo). I think a player should be able to choose when he gets coal from wood. And what about higher ratio, like for 10 timber you get 20 coal?

Also, if one of the units, that are responsible for picking a bonus will move (when builder would force them to move), then after selecting the bonus, it won't disappear.

I really like the idea, I hope it will work after some rebalancing :).
Without honour, victory is hollow.
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 15 Sep 2014, 10:16

Re: Golden Cliffs + Bonuses!

Thank you both!

Lewin, I'm attaching the file with the fixes that you suggested... is it better now?
I also changed Master crafters so that Weapon and Armor smithies are unlocked after Tannery, and made sure that the AI is able to correctly choose (and use) a bonus.
The soldiers can no longer be moved by the AI.

Tiank, I know, it's probably unbalanced, but as Lewin wrote balancing it will probably be difficult... in my opinion it is better to see how things go before deciding what to change, just to have some more insight on the consequences.

Demolishers do not actually have a higher chance to miss, I just needed a way to explain why they are so powerful against buildings but normal against troops... the excuse is: they do deal more damage to troops, but since they also miss a lot the result during fights is unchanged. :P

Master crafters work like this: every time you have more than 10 of Timber or Leather in a Storehouse, they get converted into Coal and Iron up to 10 of each; if the Coal or Iron get used, then another one is converted.
The ratio is 1 Timber -> 1 Coal and 1 Leather -> 2 Iron (based purely on the reasoning that since you need 1 Leather to make a Leather Armor but 2 Timbers to make a Lance, then Timber should "equal" less than Leather when converting it (H) )

Lastly, since I have no idea of how to detect where has the soldier gone, if you force one of them to move by having a laborer pass there you still get to keep it, immovable and unresponsible in the middle of your town. :$
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"
<<

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 15 Sep 2014, 12:09

Re: Golden Cliffs + Bonuses!

More script suggestions:
Replace the 6 player choice variables with an array:
  Code:
var PChoice: array[0..5] of TBonusType;
(I used 0..5 so it will be the same as commands like States.HouseOwner). Then you can convert many parts of your code to loops and remove code like "if u = 0 then aChoice := P1choice;" which will make it much more compact.
Lastly, since I have no idea of how to detect where has the soldier gone, if you force one of them to move by having a laborer pass there you still get to keep it, immovable and unresponsible in the middle of your town. :$
I would add the soldiers for each player (Actions.GiveGroup) in a loop in OnMissionStart rather than placing them in the map editor. Then store the GroupIDs for each soldier in an array defined like this:
  Code:
var PlayerSoldiers: array[0..5] of array[TBonusType] of Integer;
The code for adding them would be something like:
  Code:
PlayerSoldiers[1][bt1Crafters] := Actions.GiveGroup(.....)
Then you can easy kill them all with a loop inside a loop, no matter where the soldiers have walked to. You shouldn't use States.GroupAt for finding them since that relies on them not walking anywhere. You might also want lookup tables so you can create the soldiers in loop. Unfortunately Pascal Script doesn't support constant arrays, so you have to use a variable. Something like:
  Code:
var BonusSoldierType: array[TBonusType] of Integer; //Then in OnMissionStart: BonusSoldierType[bt1Crafters] := 22; BonusSoldierType[bt2Tough] := 23; //etc. //Then use it like this: for aChoice := bt1Crafters to bt8Engineering do PlayerSoldiers[1][aChoice] := Actions.GiveGroup(1, BonusSoldierType[aChoice], 14+Byte(aChoice), 25, 4, 1, 1);
Byte(aChoice) converts a TBonusType into an integer starting from 0.

Sorry if that's a lot of suggestions :P
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 15 Sep 2014, 12:24

Re: Golden Cliffs + Bonuses!

More script suggestions:
Replace the 6 player choice variables with an array:
  Code:
var PChoice: array[0..5] of TBonusType;
(I used 0..5 so it will be the same as commands like States.HouseOwner). Then you can convert many parts of your code to loops and remove code like "if u = 0 then aChoice := P1choice;" which will make it much more compact.
How?

I need them this way because this defines which player is going to be affected by the rest of the script, based on who triggered it... if I do it in a loop, doesn't the script become broken?

EDIT: Nevermind, got it. :$
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"
<<

dicsoupcan

Moorbach's Guard

Posts: 1314

Joined: 12 Feb 2012, 21:36

KaM Skill Level: Fair

Post 15 Sep 2014, 13:20

Re: Golden Cliffs + Bonuses!

the idea is awesome, this way you can make a sort of unique faction and make players build ni another way. one question though, when choosing survivalist, do only the soldiers never get hungry or citizens aswell?
You have enemies? Good. That means you've stood up for something, sometime in your life. ~ Winston Churchill
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 15 Sep 2014, 14:42

Re: Golden Cliffs + Bonuses!

Ok done (in a way similar to the one that you posted), thanks again Lewin!

Actually, "var PCStore: array[0..5] of TBonusType;" didn't work: the script validator gave no errors, but when trying to start a game it would complain about a Type mismatch with the .dat file; using instead
  Code:
var PCStore: array of TBonusType; //Then in OnMissionStart: PCStore := [bt0None, bt0None, bt0None, bt0None, bt0None, bt0None];
fixed it.

Also, changed again Master crafters: now Timber->Coal is done only when the player has at least 1 of the buildings that need Coal. (Sorry Tiank, I've figured this out only now :$ )
the idea is awesome, this way you can make a sort of unique faction and make players build ni another way. one question though, when choosing survivalist, do only the soldiers never get hungry or citizens aswell?
Everybody. :wink:
You do not have the required permissions to view the files attached to this post.
Last edited by Esthlos on 15 Sep 2014, 17:20, 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"
<<

dicsoupcan

Moorbach's Guard

Posts: 1314

Joined: 12 Feb 2012, 21:36

KaM Skill Level: Fair

Post 15 Sep 2014, 16:09

Re: Golden Cliffs + Bonuses!

if everybody will never need food then it might prove to be a bit strong, you can just focus on weapons only, skip the inn and trade all your food early on for an economy boost. i think that at least someone needs to eat, or that it takes longer before people get hungry so you need to have at least a bit of a food focus.

i think engineering is the most balanced idea i have read so far without actually testing, because you will still be slowed down due to the reqources you need and how fast they get produced.
You have enemies? Good. That means you've stood up for something, sometime in your life. ~ Winston Churchill
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 15 Sep 2014, 16:37

Re: Golden Cliffs + Bonuses!

Rich could be nerfed by disabling Metallurgists. Similar thin might be done witht Survivalist maybe - like, delete most (if not all) of his food and/or replace it with some other additional stuff?
Explorer shouldn't really be able to see the enemy bases at any point of the game, unless they scout it for themselves.
<<

Ben

User avatar

Former Site Admin

Posts: 3814

Joined: 08 Jan 2009, 23:00

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

Post 15 Sep 2014, 17:17

Re: Golden Cliffs + Bonuses!

I love the idea, but there are some problems of course. I don't like explorer at all. That makes the game lame and unpleasant, know my enemy sees every move I make.
Survivalist should probably start with food, right? It seems to not make sense that he would start with it. Maybe even disable survivalist from making it (disable mill, bakery, fisher, vineyard, butcher). Likewise, I think rich shouldn't start with gold and shouldn't be able to make it (ironic...:P).
Tough guys is the worst, though. I would bet my life that it is op. Seriously, do you know how strong barbarians are? They have the most attack and lifepoints! (even more than knights!!). You can easily have 200 militia in 60 minutes. 200 barbarians against the best 60 minute pt army I've ever seen is at least 3x as good.

Anyway, I'd test it if it was balanced a bit more first.
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 15 Sep 2014, 17:30

Re: Golden Cliffs + Bonuses!

Rich could be nerfed by disabling Metallurgists. Similar thin might be done witht Survivalist maybe - like, delete most (if not all) of his food and/or replace it with some other additional stuff?
Mmm... could work, but I'd like to read a few more opinions on balance first.
I love the idea, but there are some problems of course. I don't like explorer at all. That makes the game lame and unpleasant, know my enemy sees every move I make.
Ok, that is unpopular.
What about making it scale with the number of houses built, or with time, so that the map is fully explored by the X (60? 90? Peacetime?) minutes mark?
Survivalist should probable not have food, right? It seems to not make sense that he would start with it.
Good point, didn't think of this.
I guess that Rich too should start with no Gold then...
Tough guys is the worst, though. I would bet my life that it is op. Seriously, do you know how strong barbarians are? They have the most attack and lifepoints! (even more than knights!!). You can easily have 200 militia in 60 minutes. 200 barbarians against the best 60 minute pt army I've ever seen is at least 3x as good.
But I liked the idea of a barbarian horde :'(
How to balance them... maybe forbid the player from having ranged units?
(This would also make sense: a proud descent of tough warriors, they're too manly to kill from afar like cowards would!)

This way sure, he has a horde of very powerful fighters, but with no ranged support they're gonna die a lot... I'll do some test fights, to see how does a barbarian only army (whose "value" is 1 handaxe+1Gold per unit) fare against an equal army and against a Snipers army (which I thought to be a potential hard counter to Tough People).
Anyway, I'd test it if it was balanced a bit more first.
Image
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 15 Sep 2014, 18:21

Re: Golden Cliffs + Bonuses!

I think Explorer is okay. I would like to see how it works after some games. I keep in mind what Lewin once told about having all map visible, that it wouldn't matter that much to gameplay. Yeah, sneaking would be way harder with that, but remember, that only a player that selects that bonus has it. And writing all the time to teammates during the battle is not easy at all. Especially, when other team has some powerful bonuses. Also, it's hard to tell, what other players are making, only horse rushes might be noticeed earlier and player can prepare for them. So maybe keep it as it is for now :).

About balancing Tough People, disabling ranged is an interesting idea. Also consider what I wrote earlier, 4 axes for one Barb (maybe even 3 axes would be enough). With that you can still see Barb horde, if player decides to spam only them.
maybe forbid the player from having ranged units?
(This would also make sense: a proud descent of tough warriors, they're too manly to kill from afar like cowards would!)
Like cowards would? Say that to Legolas face to face...
Without honour, victory is hollow.
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 15 Sep 2014, 18:50

Re: Golden Cliffs + Bonuses!

About balancing Tough People, disabling ranged is an interesting idea. Also consider what I wrote earlier, 4 axes for one Barb (maybe even 3 axes would be enough). With that you can still see Barb horde, if player decides to spam only them.
Just finished my little battle test: up to Milita Cost x 2, Barbarians always win against an equivalent (calculated using the amount of Corn needed if I were to buy the weapons, armors and Gold from the Market) army of Sword Fighters + Bowmen, even with Snipers enabled.
With militia Cost x 3, though, Barbarians win nearly always with Snipers disabled and lose nearly always with Snipers enabled, so it seems that Cost x 3 is a fair trade.

(Cost x 3 means 3 Gold and 3 Handaxes... it nearly equals 1 Gold and 4 Handaxes. Which is what you wrote from the start, so I could have accepted your opinion without spending time testing :( )
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 15 Sep 2014, 21:15

Re: Golden Cliffs + Bonuses!

All right: in the attached file,
  • Tough people won't buy Hand axes from the Market, and for them producing one will cost 8 Timber (more precisely, 3 every 4 Axes produced get removed)
  • Rich starts with no Gold and won't mine for it
  • Survivalists start with no food and won't produce any, but not having to actually raise healthy, well-fed pigs to make meat means that they get more Skins (every Pig gives no meat but 2 Skins)
  • Explorers are untouched, I'd like to see how big of an impact will having everything explored from the start have on the game
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 7 guests