OpenXcom Forum

Modding => Work In Progress => Topic started by: Quinch on August 21, 2015, 07:23:38 am

Title: Dumb questions from a would-be modder
Post by: Quinch on August 21, 2015, 07:23:38 am
Question the first - is there a FAQ for creating and changing rulesets, especially following the mod reorganization following TFTD going live?

What folder do I put the files in?
What's required for a workable mod?
Is there a way to selectively delete/override vanilla rules, such as research or ufopaedia entries?

More newbie questions to come.
Title: Re: Dumb questions from a would-be modder
Post by: hellrazor on August 21, 2015, 07:39:30 am
Useful Information for Modding:

Ruleset Reference (https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_%28OpenXcom%29)

Ruleset List Order (https://www.ufopaedia.org/index.php?title=Ruleset_List_Order_(OpenXcom))

FloorOb Vanilla (https://www.ufopaedia.org/index.php?title=FLOOROB.PCK)

HandOb Vanilla (https://www.ufopaedia.org/index.php?title=HANDOB.PCK)

There are couple more for sounds etc..
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on August 21, 2015, 08:45:10 am
Those are useful - a lot of it I already know from picking over Solarius' FMP mod - but it doesn't really answer my questions about the fundamentals.
Title: Re: Dumb questions from a would-be modder
Post by: hellrazor on August 21, 2015, 10:28:17 am
Those are useful - a lot of it I already know from picking over Solarius' FMP mod - but it doesn't really answer my questions about the fundamentals.

You can overwrite vanilla definitions.
You just need to use the same name.
You can also delete vanilla definitions with "   - delete: STR_EXAMPLE_STRING"

On further notice:

Case Sensitivity and Naming (https://openxcom.org/forum/index.php/topic,2309.msg40319.html#msg40319)

Introduction to the new Mod structure (https://openxcom.org/forum/index.php/topic,3617.msg44187.html#msg44187)

Hope this helps.
Title: Re: Dumb questions from a would-be modder
Post by: hellrazor on August 21, 2015, 11:41:09 am
You might also wann read Thread here (https://openxcom.org/forum/index.php/topic,3820.msg49282.html#msg49282)

It should cover most of your questions i presume.
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on August 21, 2015, 08:59:04 pm
Yep, that helped!

Another question - is there a way to edit the UFOpaedia categories? Not the articles themselves, that's pretty well documented, but adding, removing or editing the "Aquatic Artifacts" button, for example?
Title: Re: Dumb questions from a would-be modder
Post by: Hobbes on August 21, 2015, 11:12:52 pm
Not the articles themselves, that's pretty well documented, but adding, removing or editing the "Aquatic Artifacts" button, for example?

You can rename the categories through the language files, you can reassign the vanilla articles to different categories but you cannot add new categories (and possibly not remove then also).
Title: Re: Dumb questions from a would-be modder
Post by: chaosshade on August 22, 2015, 02:39:44 am
I think Shoes was renaming things in his medals and honours mod, give that a look.
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on August 22, 2015, 03:53:29 am
That..... might work. Any guides to messing with translation strings for mods? I see there's a whole lot of yaml files for the vanilla game, but how to you define and reference overriding ones?
Title: Re: Dumb questions from a would-be modder
Post by: Hobbes on August 22, 2015, 06:38:02 am
That..... might work. Any guides to messing with translation strings for mods? I see there's a whole lot of yaml files for the vanilla game, but how to you define and reference overriding ones?

Code: [Select]
      STR_XCOM_CRAFT_ARMAMENT: COUNCIL REPORTS
      STR_HEAVY_WEAPONS_PLATFORMS: XCOM CRAFT & ARMAMENT & HWPs
      STR_UFOS: MISCELLANEOUS
      STR_UFO_COMPONENTS: UFOs & UFO COMPONENTS
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on August 22, 2015, 08:26:38 am
Can I just throw that in the ruleset? Or do I need to create a separate yml file in the mod folder? If it's the latter, I tried creating a en.yml file in the mod folder that says

Code: [Select]
en:
  STR_XCOM_CRAFT_ARMAMENT: "X-Com Operations"

But that does not seem to have any effect.
Title: Re: Dumb questions from a would-be modder
Post by: AndO3131 on August 22, 2015, 09:29:33 am
Code: [Select]
en:
  STR_XCOM_CRAFT_ARMAMENT: "X-Com Operations"
Maybe it should be
Code: [Select]
en-GB:
  STR_XCOM_CRAFT_ARMAMENT: "X-Com Operations"
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on August 22, 2015, 06:21:01 pm
Like this?

Code: [Select]
ufopaedia:
#cleanup
  - delete: STR_CRAFT_GAS_CANNON_UC
  - delete: STR_DUP_HEAD
en-US:
  STR_XCOM_CRAFT_ARMAMENT: "X-Com Operations"

Doesn't seem to work, I'm afraid.
{I have it as en-US because my localization is set to that}
Title: Re: Dumb questions from a would-be modder
Post by: Hobbes on August 22, 2015, 07:42:09 pm
Code: [Select]
extraStrings:
  - type: en-US
    strings:
      STR_XCOM_CRAFT_ARMAMENT: "X-Com Operations"
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on August 23, 2015, 04:44:11 am
Yay! That works!
Title: Re: Dumb questions from a would-be modder
Post by: FogHat on August 24, 2015, 06:10:55 am
Mind if I slip in a dumb question? I've found a few places that make it sound like you should be able to define unit type for zombification. However, when I try to define 'zombieUnit' as something other than 'STR_ZOMBIE' I get a crash to desktop. For example, 'zombieUnit: STR_SNAKEMAN_LEADER' causes a ctd. Defining my own unit type doesn't seem to help either. Do you need to define something extra in order to spawn a unit as a zombie?

Code: [Select]
items:
  - type: STR_UNIT_WEAPON
    size: 1
    weight: 6
    bigSprite: 82
    bulletSprite: 8
    fireSound: 102
    hitSound: 19
    handSprite: 104
    hitAnimation: 46
    power: 140
    accuracySnap: 100
    tuSnap: 15
    damageType: 1
    battleType: 1
    clipSize: -1
    fixedWeapon: true
    invWidth: 2
    invHeight: 2
    recover: false
    zombieUnit: STR_ZOMBIE
    flatRate: true
    arcingShot: true
#BREAK
armors:
  - type: DEADMAN_ARMOR
    spriteSheet: DOM.PCK
    spriteInv: DeadManInventoryImage
    visibilityAtDark: 6
    frontArmor: 40
    sideArmor: 35
    rearArmor: 30
    underArmor: 20
    drawingRoutine: 4
    movementType: 0
    damageModifier:
      - 1.0
      - 1.0
      - 0.0
      - 1.0
      - 0.6
      - 0.8
      - 0.6
      - 0.8
      - 0.7
      - 0.0
    loftempsSet: [ 1 ]
#BREAK
units:
  - type: STR_DEAD_MAN
    race: STR_DEADMAN
    rank: STR_ZOMBIE
    stats:
      tu: 40
      stamina: 70
      health: 50
      bravery: 90
      reactions: 45
      firing: 50
      throwing: 65
      strength: 34
      psiStrength: 50
      psiSkill: 0
      melee: 76
    armor: DEADMAN_ARMOR
    standHeight: 21
    kneelHeight: 16
    value: 25
    deathSound: 90
    moveSound: -1
    energyRecovery: 32
    intelligence: 6
    aggression: 1
    livingWeapon: true

Thanks!
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on August 24, 2015, 08:53:00 pm
One more question, is it possible to add a newline to ufopedia entries?
Title: Re: Dumb questions from a would-be modder
Post by: Solarius Scorch on August 24, 2015, 09:15:15 pm
One more question, is it possible to add a newline to ufopedia entries?

Yes, via {NEWLINE}.
Title: Re: Dumb questions from a would-be modder
Post by: Warboy1982 on August 24, 2015, 11:39:08 pm
as i recall it spawns terrorists (as in units ending with _TERRORIST) and STR_ZOMBIE isn't a rank
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on August 26, 2015, 04:50:24 am
Yes, via {NEWLINE}.

Cool, thanks.

One more, is it possible to set the date when the game begins?
Title: Re: Dumb questions from a would-be modder
Post by: Dioxine on August 26, 2015, 05:30:00 am
One more, is it possible to set the date when the game begins?

Code: [Select]
startingTime:
  second: 0
  minute: 0
  hour: 12
  weekday: 4
  day: 1
  month: 1
  year: 2601
Title: Re: Dumb questions from a would-be modder
Post by: Hobbes on August 26, 2015, 05:44:47 am
Code: [Select]
startingTime:
  year: 2601

Dang... my plans for the Ancient Egypt total conversion just got scrubbed because it doesn't accept pre-historic dates :(
Title: Re: Dumb questions from a would-be modder
Post by: Dioxine on August 26, 2015, 05:56:05 am
How would Egyptians know who the Jesus was, especially before he was even born, anyway? They'd use their own dating system :)
Title: Re: Dumb questions from a would-be modder
Post by: Hobbes on August 26, 2015, 07:11:27 am
How would Egyptians know who the Jesus was, especially before he was even born, anyway? They'd use their own dating system :)

Arabs, Indians, Chinese and a few other countries have their own dating systems but hardly anyone hears about them too. Plus Jesus will be the tribal commander of the anti-egyptian host determined to gain their liberty from their cruel alien overlords.

I'm planning to sue Stargate SG-1 once I complete it since they clearly stole my idea years ago. And the Bible too.
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on August 26, 2015, 07:22:15 am
Thanks Dioxine.

Here's another, though - I've been using the Nightly Ruleset Reference on the wiki, but that rule is not there. Is there a more comprehensive source around I can use then?
Title: Re: Dumb questions from a would-be modder
Post by: Solarius Scorch on August 26, 2015, 11:23:41 am
Thanks Dioxine.

Here's another, though - I've been using the Nightly Ruleset Reference on the wiki, but that rule is not there. Is there a more comprehensive source around I can use then?

Not to my knowledge. But we can So we should put info on the Ufopaedia whenever we find it. :)
Title: Re: Dumb questions from a would-be modder
Post by: DracoGriffin on August 26, 2015, 06:21:45 pm
Thanks Dioxine.

Here's another, though - I've been using the Nightly Ruleset Reference on the wiki, but that rule is not there. Is there a more comprehensive source around I can use then?

Yes, the comprehensive source is hacking Warboy's brain.
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on August 26, 2015, 06:24:43 pm
Yes, the comprehensive source is hacking Warboy's brain.

Well, I can get some chloroform cheap. Wanna split money on gas?
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on September 05, 2015, 07:42:22 pm
Anyone know if it's possible to use the needItem research clause to cover an array of possible items? For example, I want to have a research topic named "Sonic weapon analysis" that would require any of the sonic weapons to start. Is that doable?
Title: Re: Dumb questions from a would-be modder
Post by: Solarius Scorch on September 06, 2015, 11:34:39 am
Anyone know if it's possible to use the needItem research clause to cover an array of possible items? For example, I want to have a research topic named "Sonic weapon analysis" that would require any of the sonic weapons to start. Is that doable?

Yes, using the "unlocks" command:

Quote
  - name: STR_SONIC_PISTOL
    unlocks:
      - STR_SONIC_WEAPON_ANALYSIS
  - name: STR_SONIC_RIFLE
    unlocks:
      - STR_SONIC_WEAPON_ANALYSIS
  - name: STR_SONIC_CANNON
    unlocks:
      - STR_SONIC_WEAPON_ANALYSIS

  - name: STR_SONIC_WEAPON_ANALYSIS
    cost: 0
    points: 0
    dependencies:
      - STR_SONIC_PISTOL
      - STR_SONIC_RIFLE
      - STR_SONIC_CANNON

Even though STR_SONIC_WEAPON_ANALYSIS has three dependency techs, each of them contains the "unlocks" item, which gives you access to STR_SONIC_WEAPON_ANALYSIS without researching the other two techs.
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on September 07, 2015, 05:09:16 am
Hmm, that seems to focus around the research tree. I'm trying to aim for something along the lines of "hmm, we recovered a sonic weapon. Let's take one apart", rather than researching them one by one.
Title: Re: Dumb questions from a would-be modder
Post by: Warboy1982 on September 07, 2015, 06:08:58 am
Yes, the comprehensive source is hacking Warboy's brain.

IRC is the best option for quick results.
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on September 30, 2015, 09:19:53 am
I've been rewriting the expanded gauss arsenal mod and I'm trying to figure out what's wrong with this research ruleset - all weapons are researchable at the start of the game, whereas they should be locked by Gauss Principles for first tier and Advanced Gauss Weapons for the second.

Any clues?

https://dl.dropboxusercontent.com/u/33551029/openXcom/Second%20Alien%20War.rar
Title: Re: Dumb questions from a would-be modder
Post by: chaosshade on October 01, 2015, 01:18:17 am
I rewrote the Expanded Gauss Arsenal mod for my own purposes so I have some experience w/ it.  To me, it sounds like the dependencies tags have errors in them.  Check the wording, spacing, and the formatting.
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on October 01, 2015, 03:13:57 am
Oh, Warboy helped me figure it out - apparently, getOneFree is only meant to use on captured aliens, putting it into the ruleset with a non-captured item did weird things.

Also, what did you do? I'm always on the lookout for more TFTD mods.
Title: Re: Dumb questions from a would-be modder
Post by: chaosshade on October 01, 2015, 08:17:02 am
I rewrote the unlock order.  I didn't like how much the mod put me at a tactical disadvantage (it was better to just ignore Gauss and go for Sonics right away because of the volume of stuff you needed to research) so I set it up to unlock in stages, Light (pistols and SMG,) Medium (Rifles and Shotgun,) and Heavy (Heavy Gauss and LMG) Gauss weapons and it followed the order properly afterward (Cannon, Defenses.)  I also made it so you don't need to have the new fighter flying sub to unlock the Gauss Tank... because that's intensely stupid and the Gauss Coelocanth is effectively useless by the time you get it anyway.
Title: Re: Dumb questions from a would-be modder
Post by: Meridian on June 27, 2017, 10:20:10 am
Oh, Warboy helped me figure it out - apparently, getOneFree is only meant to use on captured aliens, putting it into the ruleset with a non-captured item did weird things.

This limitation has been removed in the latest nightly.
Title: Re: Dumb questions from a would-be modder
Post by: Quinch on June 27, 2017, 05:54:23 pm
Woohoo!