Junior Member
Join Date: Dec 2014
Location: Northern Michigan
Posts: 9
|
Greetings!
I'm working on a game system and need a little help. Is there a way to have 2 cost profiles? The game has a cost and a battle rating that needs to be calculated. Is this possible? Any help would be appreciated! |
#1 |
Senior Member
Join Date: May 2012
Posts: 206
|
Costs can be calculated but can you add more information on what it is you are trying to achieve and how the game function works - people will be able to give you more ideas that way round
My own Warlord Games gallery and the home of the Warlord Games datafiles: http://www.facebook.com/ABDataFileWarlordGames |
#2 |
Junior Member
Join Date: Dec 2014
Location: Northern Michigan
Posts: 9
|
Good call. i didn't think about that. The game is Battlegroup Fall of the Reich. Armies are built with two things in mind, point cost and battle rating. Each unit has a battle rating that needs to be calculated (i.e. A Armoured Infantry Platoon has a point cost of 136 and has a Battle rating of 15). What I'm trying to do is to total the BR when the army is pointed out and display it on the roster.
Hope that explains it a little bit better. |
#3 |
Senior Member
Join Date: May 2012
Posts: 206
|
Yup does help - is the armoured platoon a pre-selected unit, i.e. you choose it and all the units under the platoon come with it or do you select the units that fit into it?
You can have a calculated stat that displays the battle rating and then link this to the statset the platoon uses - as an example have a look at the Black Powder files - when you build a regiment it creates a breakpoint (which is roughly 50% of the units ignoring certain artillery or skirmishers etc) What is the link or calculation between the cost and battle rating or vice versa? You can either use a calculated stat or a global script in entity done, quite a few different options can be done My own Warlord Games gallery and the home of the Warlord Games datafiles: http://www.facebook.com/ABDataFileWarlordGames |
#4 |
Junior Member
Join Date: Dec 2014
Location: Northern Michigan
Posts: 9
|
The Armoured Platoon is a preselected unit and it can have up to 4 platoon support options. Some of these options have their own battle rating as well.
The game doesn't really have a breakpoint like Black Powder. There are points limits for the type of game. The battle rating isn't really a percentage of the point value tho. There are also unique and restricted units. I haven't gotten into figuring that out yet. How would such a script be written? My coding skills suck at the moment. Lol Here's a picture of the Armoured Platoon page. Hopefully that helps a bit. armoured-Plt.png Last edited by strahd1970; December 18th, 2014 at 08:53 AM. |
#5 |
Senior Member
Join Date: May 2012
Posts: 206
|
Ah gotcha - can I just check if I am reading this right:
1. Choose the armoured platoon, starts with a base rating of 15 2. choose options allowed, each option adds to the battle rating, i.e. HMG team adds +1 battle rating? If that's the case then add a stat to each unit for the battle rating but only display it on the platoon, when you add a unit to the platoon then use script in the Postlink section so that it takes the units battle rating and adds it to the parent (the platoon), roughly something like this: var batRating as number batRating = stat[batRating] parent.stat[batRating] = parent.stat[batRating] + batRating That's using the assumption though that each unit selected increases the platoon battle rating My own Warlord Games gallery and the home of the Warlord Games datafiles: http://www.facebook.com/ABDataFileWarlordGames |
#6 |
Junior Member
Join Date: Dec 2014
Location: Northern Michigan
Posts: 9
|
Your assumptions are correct. Each unit you choose be it a tank, forward hq, logistics or engineering has a battle rating.
With the given code, that would total the overall battle rating I'm assuming. I've attached a roster so you can see what I mean. |
#7 |
Senior Member
Join Date: May 2012
Posts: 206
|
Yup it would total the overall rating, is that what you were after?
My own Warlord Games gallery and the home of the Warlord Games datafiles: http://www.facebook.com/ABDataFileWarlordGames |
#8 |
Junior Member
Join Date: Dec 2014
Location: Northern Michigan
Posts: 9
|
Yes. I'm just having issues getting the platoon support options to the parent. I've also tried using a script in statcalc to add the battle rating:
var BR as number BR = stat[BR] @value = this.tagvalue[BR.?] All that I get with that script is the platoon BR on the roster. I've also tried several different variations of the Postlink script as well. Last edited by strahd1970; December 21st, 2014 at 05:14 PM. |
#9 |
Junior Member
Join Date: Dec 2014
Location: Northern Michigan
Posts: 9
|
Okay, I'm getting close, but I'm still having issues with getting the Battle Rating (BR) to add up. Here's what I'm using as a stat calc script:
Stat Id is stBR Stat Name is BR Test Expression is BR.? Tally script is: var BR as number BR = cost[unit] @value = this.tagvalue[BR.?] + BR Like this it reads the units BR and it shows it on the Roster like I want. Sadly when you add a different unit it replaces the first units BR and doesn't add them together. Any suggestions would be much appreciated! |
#10 |
|
|