Home » MODDING HQ 1.13 » v1.13 General Development Talk » "1.13" Mod - Main Thread
Re: "1.13" Mod - Main Thread[message #10808]
|
Mon, 19 September 2005 05:06
|
|
dextertt |
|
Messages:54
Registered:November 2000 |
|
|
Kaiden and Mudgsy,
In regard to externalizing the hard code values, is it possible to externalize the accuracy penalties for target in different stances and cover ?
for example:
standing = no penalty
crouch = %?? to hit penalty
prone = %?? major to hit penalty, I think the weapons with all attachments make it too easy to hit a prone target where as in real life it is very very difficult to hit such target. This is where area weapons such as grenades and mortar play a crucial role.
also, if a target is behind sand bags, windows, %?? to hit penalty ?
I think combat should take longer, less precise, more tactical movement and flanking, more use of area weapons, and ammo supply an issue.
in the weapons.xml file there is an a variable: bAccuracy = 0 . Is this value being use ? can it be assigned a negative value. My thinking is that sniper weapons and machine gun, are more difficult to operate so only mercs with very high attribes should use them.
thanks.
Report message to a moderator
|
Corporal
|
|
|
|
|
|
|
|
|
|
|
|
Re: "1.13" Mod - Main Thread[message #10818]
|
Tue, 20 September 2005 02:22
|
|
Kaiden |
|
Messages:502
Registered:September 2003 |
|
|
Snap, here is the syntax for loading a value from the INI file:
INI File contents:
[Options]
MY_VALUE = 15
YOUR_VALUE = 32
SOMEONE_ELSES_VALUE = 0
Variable = ReadINI.Read[datatype]("SectionName","ValueName",DefaultValue);
So if you wanted to get MY_VALUE from the INI file, here is your function Call:
INT32 iMyValue = Readini.Readinteger("Options","MY_Value",10);
If it finds the INI file, and finds MY_VALUE =, with a valid Integer value assigned, it will return 15, so that iMyValue will be set to 15.
However, if it does not find the INI file, or MY_VALUE, or an invalid value is assigned, it will use the Default value and iMyValue will be set to 10.
In the above example, the default value can be 10, or it canbe iVariablewith10assignedtoit. but it can't be:
#define MY_DEFAULT_VALUE 10.
INT32 iMyValue = Readini.Readinteger("Options","MY_Value",MY_DEFAULT_VALUE);
Report message to a moderator
|
|
|
|
|
Re: "1.13" Mod - Main Thread[message #10820]
|
Tue, 20 September 2005 13:03
|
|
Kaiden |
|
Messages:502
Registered:September 2003 |
|
|
OK, Here's a taste of things to come from externalized options, this is what I have so far:
[Options]
; This options file cannot be added to without hard coding. But it can be changed as much as you want.
; By default, the values below are the values present in the 9-14-05 release of the code.
; These are the Starting cash values for the various difficulties.
;-------------------------------------
NOVICE_CASH = 45000
EXPERIENCED_CASH = 35000
EXPERT_CASH = 30000
INSANE_CASH = 15000
;-------------------------------------
; TRUE Enables the ability to sell items from the sector Inventory screen with ALT-LMB option.
; FALSE Turns off the option. PRICE_MODIFIER is a divisor, 4 = 25% of the item's value.
; Setting a value of 20 would mean 5% of the items value, and a value of 10 would mean 10%.
;-------------------------------------
CAN_SELL_ALT_LMB = TRUE
PRICE_MODIFIER = 4
;-------------------------------------
; The following values deal with the IMP merc generation, MIN_ATTRIBUTE_POINT is the lowest
; you can lower an attribute, and the lowest you can lower a skill before it hits zero.
; Max_ATTRIBUTE_POINT is of course, the opposite, the highest amount you can raise a stat to.
; IMPATTRIBUTEPOINTS is the amount of extra points you start out with when all of your stats
; and skills are set to 55. MAX_ZERO_BONUS is the amount of stat points
; that you receive when you take a skill from 35 to Zero. Currently in the game, you lose
; 20 stat points when you do this, the skill goes from 35 to Zero and you gain 15 points in
; return. You can now change that here. START_ATTRIBUTE is the value all of your stats and skills
; start out as. Currently in game it is set to 55.
;-------------------------------------
MIN_ATTRIBUTE_POINT = 35
MAX_ATTRIBUTE_POINT = 90
IMPATTRIBUTEPOINTS = 40
MAX_ZERO_BONUS = 15
START_ATTRIBUTE = 55
;-------------------------------------
; MAX_MILITIA_PER_SECTOR defines the max number of Militia that can be trained in each sector.
; Keep in Mind That there is not enough room on the strategic map to display more than 20
; Militia per sector correctly(could possibly change) but they will still be there to defend,
; and you can still train them, and it will still cost you.
; MAX_TRAINING_SQUAD_SIZE is the number of Militia you train at one time for the price of:
; MILITIA_TRAINING_COST which is the cost of training militia.
; MIN_LOYALTY_TO_TRAIN is the lowest loyalty a town can have and still allow you to train Militia.
;-------------------------------------
MAX_MILITIA_PER_SECTOR = 20
MAX_TRAINING_SQUAD_SIZE = 10
MILITIA_TRAINING_COST = 750
MIN_LOYALTY_TO_TRAIN = 20
;-------------------------------------
; I'll document these later, save to say, DO NOT LOWER ***MAX_STRATEGIC_TEAM_SIZE***
; Basically the 1st set are the number of available troops the queen starts with.
; The Second four are (Mugsy?) How full the initial Garrisons are.
; The 3rd set are the number of extra ELITES generated by the two highest difficulty levels
; The last set is the minimum size of an enemy group. This is the smallest group size an enemy
; wants to travel with. And this option right under the comments, this is the largest size an
; enemy can attack with at one time. And thats kind of misleading, see, two groups of 20 could
; attack you at one time, only 20 would be shown in the sector, and as you slowly kill them off
; one at a time, they are replaced until the surpluss is under 20. (Mugsy, am I understanding that
; correctly?) Anyway, the most important thing, is that you DO NOT LOWER THIS NUMBER. It can and
; will crash your game.
;-------------------------------------
MAX_STRATEGIC_TEAM_SIZE = 20
;-------------------------------------
NOVICE_QUEENS_POOL_OF_TROOPS = 150
EXPERIENCED_QUEENS_POOL_OF_TROOPS = 200
EXPERT_QUEENS_POOL_OF_TROOPS = 400
INSANE_QUEENS_POOL_OF_TROOPS = 8000
;-------------------------------------
EASY_INITIAL_GARRISON_PERCENTAGES = 70
EXPERIENCED_INITIAL_GARRISON_PERCENTAGES = 100
EXPERT_INITIAL_GARRISON_PERCENTAGES = 150
INSANE_INITIAL_GARRISON_PERCENTAGES = 200
;-------------------------------------
EXPERT_ELITE_BONUS = 25
INSANE_ELITE_BONUS = 50
;-------------------------------------
NOVICE_MIN_ENEMY_GROUP_SIZE = 3
EXPERIENCED_MIN_ENEMY_GROUP_SIZE = 4
EXPERT_MIN_ENEMY_GROUP_SIZE = 6
INSANE_MIN_ENEMY_GROUP_SIZE = 8
;-------------------------------------
;More to come later, I want to see what the file-access does to game speed first. EDIT: Also, Mugsy, Snap, I know several places where I probably should have passed the value through the calling function to be more efficient, (Since Constants have a global scope, it wasn't an issue until they became local variables) but I'll go back and fix that later as I get a chance.
EDIT2: The more we work on this, the more obsolete save-game editors become
Report message to a moderator
|
|
|
|
|
|
Re: "1.13" Mod - Main Thread[message #10823]
|
Tue, 20 September 2005 21:29
|
|
Kaiden |
|
Messages:502
Registered:September 2003 |
|
|
Dextertt, funny you should ask, I was going to make that an option when I found the bit of code restricting militia to town sectors and SAM sites, but I decided to hold off on it for now, it was an all or nothing kind of deal, couldn't restrict it to just roads, or choke points.
Also, since I know where that code is, I want to look for any city hardcoding that is done as far as determining which sectors are cities and which ones are sam sites, but that will have to wait. For now, you could attempt to edit cities.xml and see what happens, let me know the resulsts if you do.
Report message to a moderator
|
|
|
|
|
|
|
Re: "1.13" Mod - Main Thread[message #10827]
|
Wed, 21 September 2005 03:19
|
|
Madd_Mugsy |
|
Messages:634
Registered:July 2005 Location: Canada |
|
|
Quote:
;-------------------------------------
MIN_ATTRIBUTE_POINT = 35
MAX_ATTRIBUTE_POINT = 90
IMPATTRIBUTEPOINTS = 40
MAX_ZERO_BONUS = 15
START_ATTRIBUTE = 55
;-------------------------------------
We should also put a disclaimer here stating that they shouldn't go less than 0 or greater than 100 for the min/max/starting.
Quote:
; MAX_MILITIA_PER_SECTOR defines the max number of Militia that can be trained in each sector.
; Keep in Mind That there is not enough room on the strategic map to display more than 20
; Militia per sector correctly(could possibly change) but they will still be there to defend,
; and you can still train them, and it will still cost you.
Are you sure about this? I think setting it much higher than 20 could result in a crash.
Quote:
; I'll document these later, save to say, DO NOT LOWER ***MAX_STRATEGIC_TEAM_SIZE***
...
;-------------------------------------
MAX_STRATEGIC_TEAM_SIZE = 20
;-------------------------------------
This number will need to be increased if the militia limit is increased. Again, I'm not sure about the effects of raising it above 20. I tried having more than 20 enemies in a garrison when I first added the Insane difficulty level, and it crashed if I did the Alt-O cheat. Note sure what else could happen.
Quote:
; Basically the 1st set are the number of available troops the queen starts with.
These are how many reinforcements the queen can train, in addition to starting garrisons and initial patrols. At the most basic level, these are for the new patrols that come out of Meduna.
Quote:
; The Second four are (Mugsy?) How full the initial Garrisons are.
Correct. This reminds me, we should be able to externalize all the garrison and patrol information too. Oh, and while I'm thinking about externalizing, we also still need to externalize the other shopkeeper information (cash on hand, markup, etc).
Quote:
; The 3rd set are the number of extra ELITES generated by the two highest difficulty levels
Again, a percentage. So 50 = 50% of regular troops will be converted to elites.
Quote:
; The last set is the minimum size of an enemy group. This is the smallest group size an enemy
; wants to travel with.
Correct.
Report message to a moderator
|
|
|
|
|
Re: "1.13" Mod - Main Thread[message #10829]
|
Wed, 21 September 2005 04:24
|
|
Kaiden |
|
Messages:502
Registered:September 2003 |
|
|
Mugsy,
When I originally began messing with the code over a year ago, I upped all the enemy data, including MAX_STRATEGIC_TEAM_SIZE to 40, Increased % of Elites, gave the Queen 5000 troops for her pool, And then I started playing. It didn't take long after Drassen to realize that I was ALWAYS going to have to babysit the Militia, so I upped the Militia size to 30, and to balance things out, increased the cost of training to 1500, and upped the number trained per session to 12.
While I didn't play through the entire game in this fashion, I did capture and train Militia in the Northern 5 cities and never had a crashing problem. But then again I had no need to use the cheat function. More than likely there's an integer somewhere that's not big enough, which we will have to fix when we find it. I'll try the cheat tonight and see if it crashes me. Keep in mind though, I directly modified the constants when I did it before, this time I replaced the constants instead, so there are potential problems. But everything seemed functional through my testing.
You are probably right about the strategic team size needing to be large enough to accomidate the militia team size, I'll test that out and add a note about it in the INI file. As well as a note representing the valid ranges. But when I tested it back then, every aspect of militia seemed to work just fine, auto-resolves, training, tactical fights including my mercs, etc...
At any rate, the code works with the values set at default level, so worst case scenario, maybe they won't be able to change some of them until the next release, but I'm sure we'll hear about any crashes that are caused by changing the values out of range. I can also put restrictions in the code making sure that the values can't be raised/lowered beyond a certain point. Or at the very least, like I said, indicate the valid ranges within the INI file itself.
Report message to a moderator
|
|
|
|
Re: "1.13" Mod - Main Thread[message #10830]
|
Wed, 21 September 2005 04:59
|
|
Madd_Mugsy |
|
Messages:634
Registered:July 2005 Location: Canada |
|
|
Quote:
When I originally began messing with the code over a year ago, I upped all the enemy data, including MAX_STRATEGIC_TEAM_SIZE to 40, Increased % of Elites, gave the Queen 5000 troops for her pool, And then I started playing. It didn't take long after Drassen to realize that I was ALWAYS going to have to babysit the Militia, so I upped the Militia size to 30, and to balance things out, increased the cost of training to 1500, and upped the number trained per session to 12.
Cool, good to know. Maybe I just did something dumb to screw it up then
Report message to a moderator
|
|
|
|
|
|
|
|
Re: "1.13" Mod - Main Thread[message #10835]
|
Wed, 21 September 2005 23:26
|
|
Kaiden |
|
Messages:502
Registered:September 2003 |
|
|
Mugsy,
Considering the amount of work involved in basing those two constants on difficulty level, the ease of editing a plain-text INI file, and the fact that the players and modders alike can change these values regardless of difficulty level, I don't think it would be worthwhile. It wouldn't be difficult, it would just take someone 3-6 hours of tedious copy/pasting...
Zango, these values are already defined in the new Ja2_Options.ini file, so you can configure them, just follow the guidelines outlined in the INI file comments. Which I will update in my post above probably this evening after I e-mail the new release to Mugsy and backup my hard-drive to DVD's, but before I pack up my PC and leave (Hurricane Rita) :help: ...
Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pages (19): [ 17 ] |
|
Goto Forum:
Current Time: Sun Jan 05 00:38:54 GMT+2 2025
Total time taken to generate the page: 0.04969 seconds
|