Author Topic: How to cheat Kitsune back?  (Read 3616 times)

Offline MoonKid

  • Captain
  • ***
  • Posts: 59
    • View Profile
How to cheat Kitsune back?
« on: November 13, 2021, 01:11:16 pm »
My Kitsune is destroyed and I realize that I need it for the orbital missions.

How can I cheat it back? I checked the SAV file and found the string "KITSUNE" 3 times. No idea what this strings are for.

EDIT: Can I just remove all KITSUNE strings from the SAV file? Would this be filled up with default values and the event comes back again?
« Last Edit: November 13, 2021, 04:36:21 pm by MoonKid »

Offline FireStarTracer

  • Sergeant
  • **
  • Posts: 20
    • View Profile
Re: How to cheat Kitsune back?
« Reply #1 on: November 13, 2021, 07:13:28 pm »
1.)  I wouldn't go messing about with your save file without saving it first because thats a good way to screw it up and lose your game.    That goes for pretty much any file you mess with in OXCE, but especially save games.    And some of those variables for the Kitsune in the save I am willing to bet are tied to the research aspect given its seemingly unique nature.

2.) yes you could do it.   I know its possible in theory to change what craft are in your hangar via the saves if you know enough about what to change and what to change it to.   I kinda know through trial and error, but I'm not sure I could simply explain it so it would work for you over the internet, nor do I know what your skill level is in editing such files, so either my explanation or something you dont know could cause it not to work.   

Beyond that its only something I did temporarily (partly to see if it would work, and mostly when messing around during my own modding experiments) and I never used it on a permanent save and I've only used it with vehicles easily purchased (EG no unusual or unique craft) so I dont know if doing that would have unintended consequences (some changes you can make to OXCE files including save files may require changes be made elsewhere, and unless you know what to change it means that - at best - what you try doesn't work.  At worst, it can mean it's an error that will crash your game.)

And I've done enough modding so far to know that sometimes errors don't happen right away (I've been playing around with creating new weapons for my own game for example, and I've had the game run fine until it runs into an error I made and then crash, later.)    That sort of thing can increase the chances of you losing your save, plus any progress you make up to that point.

The safest/easist thing might be to revert to a save when it was destroyed.

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: How to cheat Kitsune back?
« Reply #2 on: November 13, 2021, 11:11:20 pm »
EDIT: Can I just remove all KITSUNE strings from the SAV file? Would this be filled up with default values and the event comes back again?

Probably, but it might also mess things up. A safer alternative woudl be to add a moth-balled Kitsune to one of your base inventories. Open your save, search for the base name. Scroll down until you get to the item list (might take a while, depending on how many soldiers you have at the base):

Code: [Select]
    items:
You can also directly search for "    items:" (with four preceeding spaces).

add the entry

Code: [Select]
STR_MOTHBALLED_KITSUNE: 1
to that list. Make sure the preceeding spaces match the other entries, otherwise the save will not load. As FireStarTracer already stated, you might want to use separate save for this or maek a backup first.
« Last Edit: November 13, 2021, 11:14:52 pm by krautbernd »

Offline FireStarTracer

  • Sergeant
  • **
  • Posts: 20
    • View Profile
Re: How to cheat Kitsune back?
« Reply #3 on: November 14, 2021, 12:30:08 am »
Probably, but it might also mess things up. A safer alternative woudl be to add a moth-balled Kitsune to one of your base inventories. Open your save, search for the base name. Scroll down until you get to the item list (might take a while, depending on how many soldiers you have at the base):

Code: [Select]
    items:
You can also directly search for "    items:" (with four preceeding spaces).

add the entry

Code: [Select]
STR_MOTHBALLED_KITSUNE: 1
to that list. Make sure the preceeding spaces match the other entries, otherwise the save will not load. As FireStarTracer already stated, you might want to use separate save for this or maek a backup first.

That's a good idea, and one I didn't think of.  I was thinking of just modding in the Kitsune wreck to build from scratch and re-building it, but again I'm not sure how that would work with one-offs.

Also wouldn't having a mothballed Kitsune require having either an open hangar slot for it to be usable?   It's something I've never tried before but I know its an issue when dealing with other issues (eg troop capacity and deployment)

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: How to cheat Kitsune back?
« Reply #4 on: November 14, 2021, 01:33:53 am »
Also wouldn't having a mothballed Kitsune require having either an open hangar slot for it to be usable?   It's something I've never tried before but I know its an issue when dealing with other issues (eg troop capacity and deployment)

The mothballed Kitsune is just an item, not a craft - which has the advantage of not requiring craft-specific entries (such as latitude and longitude) when you modify the save file. And no, the mothballed Kitsune does not require a hangar either, as it's not a craft. It does however require a hangar when you "built" it via manufacturing, at which point you use the item "mothballed Kitsune" to built the craft "Kitsune".
« Last Edit: November 14, 2021, 01:36:15 am by krautbernd »

Offline MoonKid

  • Captain
  • ***
  • Posts: 59
    • View Profile
Re: How to cheat Kitsune back?
« Reply #5 on: November 14, 2021, 09:08:09 am »

You can also directly search for "    items:" (with four preceeding spaces).

add the entry

Code: [Select]
STR_MOTHBALLED_KITSUNE: 1
to that list. Make sure the preceeding spaces match the other entries, otherwise the save will not load. As FireStarTracer already stated, you might want to use separate save for this or maek a backup first.
Thanks for this tip. I did that.

When I look into the "stockes" for "all bases" the KITSUNE now appears in the list. But when I look into the specific base there is no KITSUNE - in none of the bases. I assume there is a rule preventing to make the KITSUNE appear but this rule does not work for the "All bases" stock view (maybe a bug?).

I played a bit arround with the other KITSUNE strings in the sav file. No solution found. I am doomed! ;)

I can not go back to an older save state. This was too far away.

Offline MoonKid

  • Captain
  • ***
  • Posts: 59
    • View Profile
Re: How to cheat Kitsune back?
« Reply #6 on: November 14, 2021, 09:44:10 am »
I think it works now.

There are different "items:" sections with different indentions. Maybe now I found the correct one.

But maybe there was a second modification that was important. I checked the KITSUNE string in the "manufactureRuleStatus:" section. There I modified the "2" back to "1".

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: How to cheat Kitsune back?
« Reply #7 on: November 14, 2021, 01:35:05 pm »
I think it works now.

There are different "items:" sections with different indentions. Maybe now I found the correct one.

But maybe there was a second modification that was important. I checked the KITSUNE string in the "manufactureRuleStatus:" section. There I modified the "2" back to "1".

Which is why I explicitly stated to take care with the preceeding spaces and to make sure that you're modifying base inventory - the other item section is for items on crafts. "All bases" includes items on crafts - which is where you put the mothballed Kitsune.

Just add STR_MOTHBALLED_KITSUNE: 1 to the item section of one of your bases. You don't need to modify anything else, chance is you'll break something if you don't know what you're doing or why you're doing it.
« Last Edit: November 14, 2021, 01:39:21 pm by krautbernd »

Offline FireStarTracer

  • Sergeant
  • **
  • Posts: 20
    • View Profile
Re: How to cheat Kitsune back?
« Reply #8 on: November 14, 2021, 10:08:10 pm »
the save lists item sections not just for all the bases you have, but all the craft you have.    If you added the Kitsune under the inventory of another craft (say a public Van) then it probably wouldn't happen.

Also you always want to make sure you enter the right name.   The 'ingame' title is often not what the item is called in (for example) the rulesets.   You can check under 'ID' in ufopedia and usually find out the name but that's not a 100% guarantee either.

I'm not sure whether it needs to be in alphabetical order or not but I have noticed the lists in the save tend towards that so I tend to put them in the order the save wants just in case.
« Last Edit: November 14, 2021, 10:11:26 pm by FireStarTracer »