project-navigation
Personal tools

Author Topic: Modifying Campaign Soldiers Stats  (Read 10020 times)

nhans180

  • Guest
Modifying Campaign Soldiers Stats
« on: October 06, 2008, 04:57:29 am »
I have been working to find ways to modifying single player Campaign Soldiers Stats. Is there a way to do this through the save file with a hex editor? If so are there specific hex addresses I should look at? I have had some success with a memory editor while the game is running, but it is pretty tedious trying to sort through various addresses and it has been a trial and error thing.

Basically I am working on putting together a team I had from the original game. I think I can do it with hours of trial and error, but if someone else has done something like this, I would love to avoid the work.

Thanks!

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Modifying Campaign Soldiers Stats
« Reply #1 on: October 06, 2008, 08:52:31 pm »
just edit the script files - 0ufos.pk3 is a zip file - have a look at campaign.ufo

nhans180

  • Guest
Re: Modifying Campaign Soldiers Stats
« Reply #2 on: October 07, 2008, 01:35:31 am »
I've been through the campaign file a few times, I can not find anything on soldier stats. Is there another file for this and if so how I get the soldiers I edit?

Thanks!

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Re: Modifying Campaign Soldiers Stats
« Reply #3 on: October 25, 2008, 01:54:59 pm »
campaign main
{
   name      "_Standard Campaign"
   text      "_standard_campaign_txt"
   team      human
   soldiers   9
   scientists   6
   workers      14
   difficulty   0
   minhappiness   0.30
   maxdebts   200000
   xvirate      70
   salary {
      soldier_rankbonus 500;
      worker_base 3000;
      worker_rankbonus 500;
      scientist_base 3000;
      scientist_rankbonus 500;
      pilot_base 3000;
      pilot_rankbonus 500;
      robot_base 7500;
      robot_rankbonus 1500;
      aircraft_factor 1;
      aircraft_divisor 25;
      base_upkeep 20000;
      admin_initial 1000;
      admin_soldier 75;
      admin_worker 75;
      admin_scientist 75;
      admin_pilot 75;
      admin_robot 150;
      debt_interest 0.005;
   }

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Modifying Campaign Soldiers Stats
« Reply #4 on: October 25, 2008, 02:55:34 pm »
Actually, I recall a similar thread about editing saved games to change soldier stats, someone else figured it out with a hex editor and gave links to the editor they used and explained how to do it.  I don't remember exactly what the thread was called, but I'd suggest running a search in the forum (Sorry I don't have a link).  That might be easier then trying to "re-invent the wheel".

I wouldn't be surprised if at some point down the road someone with programming skill looked at the source and came up with a simple editor or utility.
« Last Edit: October 25, 2008, 02:57:16 pm by Destructavator »

Offline Another Guy

  • Squad Leader
  • ****
  • Posts: 239
    • View Profile
Re: Modifying Campaign Soldiers Stats
« Reply #5 on: June 24, 2009, 11:25:22 pm »
One the beggining of each month, random stats are generated for each new soldier u get. How are this stats calculations made and what variables should I edit to test around with it? On which files?

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Modifying Campaign Soldiers Stats
« Reply #6 on: June 24, 2009, 11:54:31 pm »
One the beggining of each month, random stats are generated for each new soldier u get. How are this stats calculations made and what variables should I edit to test around with it? On which files?

Not that easy. :) The character abilities are calculated at src/game/inv_shared.c:1796 CHRSH_CharGenAbilitySkills().

-geever

Offline Another Guy

  • Squad Leader
  • ****
  • Posts: 239
    • View Profile
Re: Modifying Campaign Soldiers Stats
« Reply #7 on: June 25, 2009, 12:29:52 am »
Helped a lot. Thx!  ;D

Offline jricca

  • Cannon Fodder
  • **
  • Posts: 1
    • View Profile
Re: Modifying Campaign Soldiers Stats
« Reply #8 on: November 09, 2009, 07:34:11 pm »
What if I have a mac? I only have 4 files in my .dmg and I've checked into all of them with the text editor. I'm new to macs and have no idea what I'm doing.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Modifying Campaign Soldiers Stats
« Reply #9 on: November 09, 2009, 08:21:56 pm »
if you only have four files in your dmg you have not all the needed files ;)

pk3 files should be included - and they are zip files that you can extract.

Offline epic

  • Cannon Fodder
  • **
  • Posts: 4
    • View Profile
Re: Modifying Campaign Soldiers Stats
« Reply #10 on: April 04, 2010, 02:11:28 am »
my trooper dies bevor they can train everything, i try to find the file to give all human trooper +10 on all attributs to the start. the script up is only the price, not the ablitys. or build a tarining facility.

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Modifying Campaign Soldiers Stats
« Reply #11 on: April 04, 2010, 03:07:00 am »
Soldier start abilities aren't scripted. You'll have to change the code and recompile the game.

Offline Zigora3

  • Cannon Fodder
  • **
  • Posts: 1
    • View Profile
Re: Modifying Campaign Soldiers Stats
« Reply #12 on: December 06, 2010, 06:55:44 am »
how do you recompile?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Modifying Campaign Soldiers Stats
« Reply #13 on: December 06, 2010, 06:49:50 pm »
see the wiki coding section