When searching the forums for a way to learn someone (cant remember the post sorry) said the best way to make a beginner mod is to modify an existing one.
It might have been me, I've said that before. But it could have been anyone else, since it's just generally good advice.
[ERROR] failed to load 'AlloySword'; mod disabled for next startup
C:\Users\Ryan\Documents\OpenXcom\mods\AlloySword/Ruleset/AlloySword.rul: yaml-cpp: error at line 16, column 1: illegal tab when looking for indentation
error its because you pressed tab to line up the lines not press space 4 times (i know its weird)
Yep, the dreaded syntax error. I just encountered one not an hour ago, when I forgot a space after the colon. Some more good advice: learn what a syntax error looks like, and be very careful to check and make sure you spot tiny, almost invisible differences in syntax that may have caused it, like a tab vs 4 spaces.
BUT what thus long rambling post was meant to be getting to was: Can anyone tell me what each of the values are on the weapon?
- type: String value of name (referenced through language files)
costSell: sell price in the sell screen
power: used to determine damage, it rolls a random modifier, compares against resistance, subtracts armor, and that's the final damage.
strengthApplied: true means net power = (power + strength)
damageType: 1=armor piercing, 2= incendiary, etc. Checks against corresponding resistance.
accuracyMelee: same way other accuracy values work, multiplies with soldier melee accuracy. So a 50 accuracy attack done by a soldier with 80 accuracy has a 40% chance to hit.
tuMelee: tu cost of the melee attack, separate from snap shot, aimed shot, and auto shot.
clipsize: if clipsize is on the weapon, it comes with that much without an ammo clip. If it's on the ammo clip, the clip must be inserted into the weapon. Don't put it on both.
battleType: the type of item it is on the battlescape. 1=weapon, 2=ammo, 3=melee weapon, 5=grenade, etc. I'm not sure what it's for, maybe auto-equipping soldiers?
invWidth: how many squares wide it is
invHeight: how many squares tall it is - make sure these match the graphic used, or it will look funny
flatRate: true means the TU cost is exactly how many TUs it takes, but false means it's that percentage of the soldier's max TUs
armor: this is how much damage it takes to destroy it when it's on the ground
skillApplied: whether or not it uses soldier's melee accuracy--defaults to false, vanilla stun rod always hits
listOrder: unimportant, used to determine where it shows up in the list.
It's nice to sort your lists to make it easier for the player. Most modders ignore this, but I think keeping things sorted is an important bit of polish that makes your mod really feel professional and well-built.
EDIT*
also is there a way to have held items add Front Armor (for Shields) or is that a proper coding thing I'd have to do for OpenxcomExtended (i think that's what its called anyway)
Probably requires OXCE. I believe Dioxine had a discussion going about adding shields, and a script came up for making leftArmor different from rightArmor. I don't remember the details and I can't find a link to it. You might be able to find it in the
OXCE ruleset reference. I don't know if you can do it with held items, but Dioxine's proposal involved armor suits that visibly had a shield in the off-hand and blanked out that inventory slot as a result.
Edit: I found an older post than the one I am remembering, but it is on the same topic:
https://openxcom.org/forum/index.php/topic,1109.15.htmlThis one doesn't have a solution, but I know there's a thread out there somewhere that has more details and results.
We in the OpenXcom Extended community (pretty much all of us modders and even most players) refer to OpenXcom as OXC and OpenXcom Extended as OXCE. OXC is primarily managed by SupSuper and Warboy. OXCE is primarily managed by Meridian and Yankes. You'll see plenty of Meridian and Solarius Scorch on this forum. Meridian is our greatest code writer, and Solarius Scorch is our benevolent moderator.