PDA

View Full Version : Battery Recharge Parameters


CrocodileDundee
03-11-10, 09:44 AM
For a lot of time I've been blindly experimenting with the battery recharge function and I'm about to give up. I'm not yet sure how/where the battery recharge values are stored and/or how they're calculated.

I've been fooling around with eng_power in the boat .sim file. I've tried increasing/decreasing the diesel engine power, the electric motors power with inconclusive results. Been trying to look around in the *.sim files in SH5 too with Goblin, but I can't figure it out.

If ANYONE so far has figure it out, could you please post the following info:
1. what files need to be edited? (I personally looked at the submarine *.sim files, but I might be wrong). Someone said something in a battery thread about *.zon files. I can't see why, but please enlighten me if I'm wrong.
2. How recharge is calculated? I noticed that if I increase the battery cappacity (by extending the underwater range) the battery recharge slows down. So it has to be a fixed value somewhere. I've combed the *.sim files with HexEdit, then with Goblin, but I'm still in the dark.
3. What do eng_power (both for surface/E_propulsion) variables code? I figured that acceleration changes with different values of eng_power, and the boat speed too. The greater the power, the more fuel consumption as well. But my experimentation with these variabled did not change the battery recharge time conclusively. Maybe I'm missiong something here, or maybe I didn't tweak it enough?
4. I changed (in abilities.upc) the recharge rates for the motor officer, but I can't tell a significant change in the game. Even tried extreme values (from 10% to 100000%). Since all the other abilities work just fine, I'm wondering what's going on here?
5. Are there any upgrades further in the game concerning the batteries? I looked at 'upgrade packs.upc' but I can't find anything.

Many thanks in advance guys. It's been frustrating not being able to figure out on my own :damn:, but I reckon someone must have found these info. Any info on this matter is greatly appreciated!

krupp_88mm
03-11-10, 10:16 AM
try using the hex editor and searching for "electric" i was trying to do the same thing i think the game uses this to refer to batteries in some areas

CrocodileDundee
03-11-10, 10:28 AM
What file? You mean search for 'electric' in the sub's *.sim file?

CrocodileDundee
03-11-10, 12:12 PM
Oh, I forgot,

I've also tried combinations of eng_power and engine RPM - no success! The battery charges exactly at the same rate!

CrocodileDundee
03-12-10, 04:24 AM
C'mon I can't believe no one has figured this out yet! Any takers?

piri_reis
03-12-10, 05:04 AM
The scene is just picking up speed, keep looking around for the values mate, I haven't come across anything batteries related yet :arrgh!:

shearerc
03-12-10, 05:59 AM
I have been experimenting in the same manner the last few days. Messed around with the eng_power, rpm, range values trying all sorts of combinations to no avail!

Just hope it's not hardcoded.:-?

Webster
03-12-10, 08:46 AM
battery "life" was in the sim or the zon files under electric "ranges" for sh3/sh4

the battery rechanrge time was connected to the amount of battery life

not sure if that will help you with sh5 but there it is :06:

CrocodileDundee
03-13-10, 10:02 AM
Yup, you're right Webster, I found the battery "life", is basically the E_range in the uboats sim file. What I can't find for the love of God is the recharge parameter(s). Might be hardcoded I guess...

lorka42
03-14-10, 12:04 AM
I'm currently having the same problems with the torpedos range, I wanted to increase the speed of the torpedos, but they would only go like 1km before they ran out of gas, I tried increasing the range, and it didnt make any difference. Same with increasing underwater speed, sub went like 3 km n batteries were dead, lol. If I find anything on that, ill let you know. I'm beginning to think theyre hardcoded as well.

CrocodileDundee
03-14-10, 09:12 AM
You can get the torps to run at high speed/and/or long distances. Just mod the .sim file. Load the torpGE file into goblin, then merge the sim and zon files. You can edit the toros that way (I played around with type IX acoustic one, and I managed to get it to run 10km at 50 knots. Also changed the max turn angle from 135 deg to 180. Worked like a charm. Also you can change the zon files to mod the damage amount/ min max radius.

Webster
03-14-10, 09:38 AM
Yup, you're right Webster, I found the battery "life", is basically the E_range in the uboats sim file. What I can't find for the love of God is the recharge parameter(s). Might be hardcoded I guess...


it takes lots of testing but i found different "combinations" of those numbers would make small changes to recharge times but its like figuring out just the right combination that has an effect you want and then you have no way to know if it will be a miniscule change or something noticable.

start with the stock range setting then just change your speeds and test each number 1kt, 2kt, etc. and you will see what happens, then go back and pick another range setting (i would jump in ranges of 500 at a time) and retest (if its like sh3/sh4) the numbers dont give the expected results because there is some coded formula the game uses to do in game results. you cant just use the numbers you want and expect to see it in the game, for the results you want in the game you will most likely need to use numbers that "look" wrong but give you the results you want.

i played around with this a lot for my s-boat mod and had only very minor success with effecting recharging times because when i started to see something on the recharge times change my actual sub ranges were so far off it wasnt something i could use.

CrocodileDundee
03-14-10, 10:29 AM
Yeah, you're right Webster, been trying the same thing myself. In SH3 I had some success modding the type XXI recharge, but no luck with types VII or IX. In sh4 I had some minor success with the gato but not with Balao!!! Really frustrating. I was hoping for a change in SH5. After hours of tweaking type VIIa I gave up. I just assumed I dint have the brains to guess the formula they must have harcoded.

I had an idea this morning but couldn't explore it further as I had to report for duty at Mother's Day;). Can't write in detail as typing on an iPhone can be annoying at times. However I'm thinkig the motor officer batery recharge ability must be scriped somewhere, so I plan to have a look into the py files on Monday (screw work). Maybe that's the key. Or script a new ability (active one) that would decrease recharge times dramatically for a limited time (so you could rapidly charge from 5-10% to 30-50% in a few hours (3-4 maybe rather than the current 12). That would also solve krupp88's realism issue. Dunno just a thought. I honestly hope I could get someone interested into this, so we could solve this once for all - it really bugs me and I wanna nail it. I'll keep reporting my progress meanwhile! :)

Webster
03-14-10, 11:39 AM
i think the recharge time value is a hard coded thing but there is something like a +/- value that effects it slightly.

i also found differences in times depending on how far you drained it

recharging at 50% or 10% or when you get the batery discharged warning

Ducimus
03-14-10, 11:53 AM
What i think is missing, is this little bit from SH3:


NameIdx2=1265
Year2=1939
Month2=1
NbSub2=1
Sub20=1
Renown2=0
Name2=AFA27MAK740
Energy2=1

NameIdx3=1266
Year3=1940
Month3=4
NbSub3=1
Sub30=1
Renown3=600
Name3=AFA27MAK800
Energy3=1.15

NameIdx4=1267
Year4=1941
Month4=10
NbSub4=1
Sub40=1
Renown4=1500
Name4=AFA33MAL800
Energy4=1.30


That energy modifer was hardcoded in Sh4. We couldn't touch it. So i was hoping this would be left open in SH5. Doesn't appear to be, if it is, it's in a place you wouldn't think to look.

lorka42
03-14-10, 02:39 PM
You can get the torps to run at high speed/and/or long distances. Just mod the .sim file. Load the torpGE file into goblin, then merge the sim and zon files. You can edit the toros that way (I played around with type IX acoustic one, and I managed to get it to run 10km at 50 knots. Also changed the max turn angle from 135 deg to 180. Worked like a charm. Also you can change the zon files to mod the damage amount/ min max radius.
Would you mind posting the values you used? for the range, anyway. Bah I fingered it out, I had changed the mag det range without changing the arming run, D'oh!