Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Harudoku

Pages: [1]
1
Alright, thanks, all this has really given me some framework to work with, and I'm much further along than I was when I started. However, I've hit another snag that I can't easily figure out on my own and could use some more guidance.

To try to ensure I fully understood the nuances of the sprite engine, I tried porting over XOp's Knife, to get the basics of each of the different sprite and sound types. I troubleshooted a few different things and managed to get it close to working... but openXcom always seems to crash on hit, when I swing at any target.

Code: [Select]
items:
  - type: STR_KNIFE
    size: 0.02
    costBuy: 75
    costSell: 50
    weight: 1
    bigSprite: 1000
    floorSprite: 1000
    handSprite: 1000
    power: 21
    strengthApplied: true
    damageType: 7
    clipSize: -1
    tuMelee: 15
    accuracyMelee: 90
    battleType: 3
    invWidth: 2
    invHeight: 1
    meleeSound: 1000
    meleeHitSound: 999
    meleeAnimation: 1000
    skillApplied: true
    listOrder: 2001
extraSprites:
  - type: BIGOBS.PCK
    files:
      1000: resources/harumod/BIG/knife.gif
  - type: FLOOROB.PCK
    files:
      1000: resources/harumod/FLOOR/knife.gif
  - type: HANDOB.PCK
    files:
      1000: resources/harumod/HAND/knife/
  - type: HIT.PCK
    width: 128
    height: 40
    subX: 32
    subY: 40
    files:
      1000: Resources/harumod/HIT/knife.gif
extraSounds:
  - type: BATTLE.CAT
    files:
      1000: Resources/harumod/SOUND/knifeswing.ogg
      999: Resources/harumod/SOUND/knifehit.ogg
I've checked several times, and all of the different files point to the right spots, and as well, the sounds (likely) aren't the issues, as the crash happens (mind you, at the END of the animation) even if I revert the sounds to the default. Notably, though, I don't think it ever gets to start playing knifehit.ogg. Any insight? Am I missing something? Thanks!

2
Excellent, thank you, this is what I was looking for. One last question before I start hacking at all these, because I hit another knot and I'm fairly sure I know the answer, but not yet how to apply it: Can I have a ranged stun weapon use anything but the default explosion hit sprite and noise? Seemed to just use the same sprites, but silent when I tried to do anything fancy with it.
Code: [Select]
items:
  - type: STR_TASER
    size: 0.1
    costBuy: 2450
    costSell: 1825
    weight: 6
    bigSprite: 5
    floorSprite: 5
    handSprite: 112
    bulletSprite: 5
    fireSound: 11
    compatibleAmmo:
      - STR_TASER_DART
    accuracySnap: 40
    accuracyAimed: 68
    tuSnap: 25
    tuAimed: 60
    battleType: 1
    listOrder: 2350
    invWidth: 1
    invHeight: 2
  - type: STR_TASER_DART
    size: 0.1
    costBuy: 120
    costSell: 90
    weight: 3
    bigSprite: 4
    floorSprite: 4
    hitSound: 19
    hitAnimation: 36
    power: 45
    damageType: 6
    clipSize: 3
    battleType: 2
    armor: 12
    listOrder: 2375

3
Excellent, that all worked well and the changes were implemented very successfully. I'm really happy to see that this wonderful game still has a relatively active modding community! Thanks for the help.

Next question, can anyone direct me to a few mods I might study that could teach me to change sprites and insert new ones for things such as weapons, and maybe maps? I've been searching for download links to some of the more interesting ones on the site for reference, but it's been hard to work through some of it.

4
Firstly, you need to add a listOrder to your clip, like this:

Code: [Select]
    clipSize: 5
    battleType: 2
    listOrder: 3260

The number above is purely random; I don't know what is the vanilla listorder for the rifle clip, these are hard coded and need to be overriden manually like in the example above, you have to find out in the documentation.
Figured it had to be something like that, but help me with this:
1) Where would I find this documentation? You answered this decently well in your edit
2) If I can't add this there, where would I do so? Figured it out, under the clip. Thanks.

And, to avoid the crash, you need an Ufopedia entry for your clip, like this:

Code: [Select]
ufopaedia:
  - id: STR_SNIPER_RIFLE_CLIP
    type_id: 4
    section: STR_NOT_AVAILABLE
For what it's worth, I do have something of that nature in my block of code:
Code: [Select]
ufopaedia:
  - id: Sniper-Rifle_Clip
    type_id: 4
    section: STR_NOT_AVAILABLE
What exactly am I looking to change here?

Related question, how do I keep the syntax consistent (rename it "STR_SNIPER_RIFLE_CLIP") while keeping it as "Sniper Rifle Clip" in-game?

Thanks for the help!

5
My friends and I have a bit of an LP planned, and I'm considering trying to mod to rebalance a lot of the items in the game to add more compelling choices, change the starting balance of funding and move funding from one country to another (new) one, etc; I've already hit my first snag in trying to make everything work, the solving of which would seem (to me) to be the first step towards really understanding how to work with OpenXCom's Rulesets.

Namely, I'd like to learn how to add a new ammo type for the basic rifle, if only to learn more about what all gets involved. I've managed to make a ruleset that gets the new ammo type to show up on the list, albeit on the bottom and not underneath the rifle, but, worryingly, OpenXCom crashes any time I try to open the Rifle entry in ufopaedia. What I have so far:
Code: [Select]
items:
  - type: STR_RIFLE
    compatibleAmmo:
      - Sniper-Rifle_Clip 
  - type: Sniper-Rifle_Clip
    size: 0.1
    costBuy: 300
    costSell: 225
    weight: 4
    bigSprite: 2
    floorSprite: 2
    hitSound: 13
    hitAnimation: 26
    power: 65
    damageType: 1
    clipSize: 5
    battleType: 2
ufopaedia:
  - id: Sniper-Rifle_Clip
    type_id: 4
    section: STR_NOT_AVAILABLE
Making a new sprite and changing the animation can come later, but for now I'd like to learn how to make it show up at the right spot on the list, not crash the game upon viewing the entry in UFOPaedia, etc. Any help is appreciated!

Oh, and if I'm posting this in the wrong spot, let me know.

Pages: [1]