project-navigation
Personal tools

Author Topic: Some basic modding questions  (Read 4981 times)

Offline Drovic

  • Cannon Fodder
  • **
  • Posts: 1
    • View Profile
Some basic modding questions
« on: August 22, 2011, 12:35:51 am »
Hello, I just got this game (version 2.3.1) the other day, and I've been having a bit of trouble in the campaign and I decided I'd like to do a bit of editing/modding. I'm reasonably fluent in C, but I honestly have no idea what files to look for/in. I read some stuff about .ufo files, but I wasn't able to find any of them. Now, it's entirely possible that I've missed something totally obvious, as I've been rather sleep-deprived lately, but I was hoping someone could give me some pointers as to what I need to do if I'm interested in modifying the following:
-base, production, and purchase costs
-research times
-production times
-weapon accuracy
soldier stats (This one bugs me the most, I think - it seems silly that the soldiers who are presumably elites from around the world are, when recruited, never even 'competent' in any field save for 'mental'.)

Thanks for any advice you can provide.

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Some basic modding questions
« Reply #1 on: August 22, 2011, 02:31:29 am »
Hi Drovic and welcome to the forums.

Let me stress that cheating is BAD, that said...

I'm assuming you got the official installer, so you probably got several pk3 files in your ufoai/base (ufoai = where you installed the game) directory, those contain the the game data and the one you are looking for IIRC is ufos.pk3, pk3 files are simple zip files so you should be able to extract them with your favourite zip program (might need to rename it to .zip), once that's done you can mod to your heart's content :)

Otherwise (if you got it via git) there should be in ufoai/base/ufos

Some specific files of interest to you:

research.ufo
weapons*.ufo
armour.ufo

In 2.3 the character statistics are hard coded see src/game/inv_shared.c there are several templates defined before CHRSH_CharGenAbilitySkills(), in 2.4 they are scripted in team_templates.ufo (in case you want to try it out -- which I recommend :) )

Offline Duque Atreides

  • Rookie
  • ***
  • Posts: 80
    • View Profile
Re: Some basic modding questions
« Reply #2 on: June 19, 2012, 03:38:51 am »
What program is necessary to mod this files? *.ufo? I try to open it with notepad, but it see strange.

Offline Kildor

  • Project Artist
  • Captain
  • ***
  • Posts: 757
  • Project mapper and some other stuff`er
    • View Profile
    • http://ufoai.nx0.ru
Re: Some basic modding questions
« Reply #3 on: June 19, 2012, 05:27:31 am »
Use any editor understood unix style of line-ends (any other than notepad).

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Some basic modding questions
« Reply #4 on: June 19, 2012, 08:07:25 am »
What program is necessary to mod this files? *.ufo? I try to open it with notepad, but it see strange.

A nice simple one is Notepad++.

Offline Duque Atreides

  • Rookie
  • ***
  • Posts: 80
    • View Profile
Re: Some basic modding questions
« Reply #5 on: June 24, 2012, 01:33:12 am »
Thanks!

Offline Duque Atreides

  • Rookie
  • ***
  • Posts: 80
    • View Profile
Re: Some basic modding questions
« Reply #6 on: June 24, 2012, 02:32:49 am »
Another question.

When i finished to work the .pk3 file, how to zip it? Compressed? Normal? full compressed?

Thanks

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2560
    • View Profile
Re: Some basic modding questions
« Reply #7 on: June 24, 2012, 02:57:37 am »
When i finished to work the .pk3 file, how to zip it? Compressed? Normal? full compressed?

I don't know what "compressed", "normal" and "full compressed" methods mean there, probably they're just user friendly aliases of your zip program. The game can use the archive if it is in the good ol' PKZIP format.

Btw. you don't have to re-compress the stuff the game can use the uncompressed directories directly too.

-geever