OpenXcom Forum

Modding => Work In Progress => Topic started by: Solarius Scorch on November 08, 2016, 10:27:32 pm

Title: Help! Dogs kill my game!
Post by: Solarius Scorch on November 08, 2016, 10:27:32 pm
So I'm trying to add a doggie soldier type, so they could have their own names, colours, experience etc. Sadly, the game crashes.

Here's the entry in soldiers_XCOMFILES:

Code: [Select]
  - type: STR_DOGE
    costBuy: 10000
    costSalary: 800
    minStats:
      tu: 60
      stamina: 80
      health: 15
      bravery: 10
      reactions: 50
      firing: 0
      throwing: 0
      strength: 1
      psiStrength: 40
      psiSkill: 0
      melee: 70
    maxStats:
      tu: 70
      stamina: 90
      health: 20
      bravery: 20
      reactions: 60
      firing: 0
      throwing: 0
      strength: 1
      psiStrength: 40
      psiSkill: 0
      melee: 90
    statCaps:
      tu: 100
      stamina: 130
      health: 40
      bravery: 40
      reactions: 90
      firing: 10
      throwing: 10
      strength: 2
      psiStrength: 40
      psiSkill: 0
      melee: 140
    trainingStatCaps:
      tu: 70
      stamina: 90
      health: 20
      bravery: 20
      reactions: 60
      firing: 0
      throwing: 0
      strength: 1
      psiStrength: 40
      psiSkill: 0
      melee: 90
    armor: DOGE_ARMOR
    armorForAvatar: DOGE_ARMOR
    avatarOffsetX: 68
    avatarOffsetY: 48
    soldierNames:
      - delete
      - SoldierName/ZZZ_Doge.nam
    allowPiloting: false
    allowPromotion: false
    standHeight: 12
    kneelHeight: 12
    femaleFrequency: 50
    deathMale: 94
    deathFemale: 94

I'm also attaching the .nam file.

If I remove this part:

Code: [Select]
    soldierNames:
      - delete
      - SoldierName/ZZZ_Doge.nam

AND physically delete the ZZZ_Doge.nam file, the game works as normal - the dogs just don't get any names.

Please tell me what I am doing wrong.
Title: Re: Help! Dogs kill my game!
Post by: Arthanor on November 08, 2016, 10:43:04 pm
So you don't want to wait and integrate my mod into XCF?  :o

The way I made mine work for names is that I made a new folder for names and had:

Code: [Select]
    soldierNames:
      - DogName/

I know Piratez doesn't do it this way and it seems to work. I'm not sure why really..

Edit: See the XCF thread for my doggies!
Title: Re: Help! Dogs kill my game!
Post by: Solarius Scorch on November 08, 2016, 11:37:53 pm
So you don't want to wait and integrate my mod into XCF?  :o

Of course I do, but I wanted to have something to start with - easier to integrate what you already know. Plus I had some ideas as to training caps and such, so I wanted to code them down first.

The way I made mine work for names is that I made a new folder for names and had:

Code: [Select]
    soldierNames:
      - DogName/

I know Piratez doesn't do it this way and it seems to work. I'm not sure why really..

Thanks, but it's still crashing...

So for now, they just don't have names. Hey, maybe it's for the best? So you can name them yourself.

Edit: See the XCF thread for my doggies!

Thanks! downloading them now.
Title: Re: Help! Dogs kill my game!
Post by: SupSuper on November 09, 2016, 12:24:35 am
This is invalid:
Code: [Select]
maleLast:
  - 
Title: Re: Help! Dogs kill my game!
Post by: Arthanor on November 09, 2016, 12:37:36 am
Ah! Hum.. good catch :) I did mine with:

- " "

So they get a space instead of a last name. It's pretty non-intrusive.

I just tried without the spaces between the quotation marks and that works as well. Of course, you still get the space that goes between the first name and last name, but at least it's only one extra space, not two ;)
Title: Re: Help! Dogs kill my game!
Post by: SupSuper on November 09, 2016, 02:31:41 am
If you don't want last names, just omit them entirely. Having a list of blank (which is not an empty list) just confuses the game.
Title: Re: Help! Dogs kill my game!
Post by: Arthanor on November 09, 2016, 04:32:56 am
Oh! Thanks :) I didn't even think this was a possibility. I figured the game would want a first and last name, like on IDs.
Title: Re: Help! Dogs kill my game!
Post by: Solarius Scorch on November 09, 2016, 05:41:57 am
All right, thank you for the help!