Where can I read the .XML information on AttackModes?

13 posts / 0 new
Last post
#1
Where can I read the .XML information on AttackModes?

For Example: StrSnd, fMorale, strChargeProfiles, etc

If the info is not in the documentation thread (and I don't think it is there), and searching the forums brings no more clarity, you have to either ask or figure it yourself ;)

Also, a little bonus, from me:

<table name="attackmodes"> <column name="id">1</column> <column name="strName">punch</column> <column name="strNotes"></column> <column name="nRange">1</column> <column name="fDamageCut">0</column> <column name="fDamageBlunt">0.6</column> <column name="strChargeProfiles"></column> <column name="nPenetration">0</column> <column name="nType">0</column> <column name="strSnd">cuePunch</column> <column name="bTransfer">0</column> <column name="vAttackerConditions"></column> <column name="strIMG">AModePunch.png</column> <column name="fMorale">0.05</column> <column name="strWieldPhrase">raises their fists, ready to fight</column> <column name="vAttackPhrases">swings at,jabs at,roundhouses,gut-punches</column> </table>

ID - and Id number, important cause it is used to attach the attack mode to an item, via the "aAttackModes" value in the item type.

strName - the name of the attack type

strNotes - notes by you, for you. Do nothing and don't show in-game.

nRange - Max range of the attack

fDamageCut - cut damage modifier

fDamageBlunt - blunt attack modifier

strChargeProfiles - here go one or more ID of ChargeProfile (which is another data table) dictating what kinds of and how many charges (ammo, power, etc.) each attack with this mode consumes. If left empty, the attack does not need nor use any ammo.

nPenetration - the armor penetrating power of the attack type. 0 is none, followed by 1 for common "dangerous" weapons and 2 for weapons capable of piercing proper armor (mostly high-powered or armor-piercing gun ammo). 3 is the top level, used only by the high-tech energy weapons (in vanilla, only the Gauss rifle and not-in-the-game laser rifle).

nType - type of the attack. 0 - melee, 1 - ranged (determines which attack BattleMove will be responsible for this one)

strSnd - unused, would be for the attack sound, if there were any

bTransfer - if the weapon used is transfered into enemy (arrows/spears getting stuck in their bodies). Not really sure if the modding of that part works.

vAttackerConditions - the IDs of conditions that will be applied onto the user of that attack along with chance for that to happen. For example, "211x1.0" would mean the condition ID 211 will have 100% (1.0) chance to be applied on user, upon performing that attack. Leaving that empty means no condition is applied. And before you ask - no, you cannot apply any conditions to the target of the attack.

strIMG - the image that will show in the attack mode window, on the lower right

fMorale - the impact of performing this attack will have on opponent's morale. Weak weapons have around 25% (0.25) with shooting shotgun at someone having an impact of 60% (0.6). In the example above, the fist have barely any "scaring" effect at all with 5% (0.05).

strWieldPhrase - list of possible to show up when using the "Spy" option (on the main map) on a creature wielding this weapon (having that attack mode chosen, to be precise).

vAttackPhrases - list of things to show up when the creature attacks with this attack mode. Honestly not sure how it works. Leave this empty to get a generic attack confirmations in the battle log.


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

This definitely helps out. I was looking every where in the modding docs, glad I have this list to reference back to. I tried modding a weapon for the first time into the game, and I created 3 tables for the weapon: Attack Modes, Item type, and Recipe. I hardly understood anything in the Recipe ID stuff, so I copied as pasted the clever information from the original neogame.xml. I never got it to work, but I will for sure keep experimenting :)

When you want to create a melee weapon, what tables do I need. I know I need Attack Modes, Item Types, and Recipe table. Do I need any others?

You don't really need recipe, unless that is supposed to be a craftable weapon - which I suggest to leave until after you learned to make a functional item.

As you said, you need to create an ItemType and AttackMode. Then you just need to spawn the item into the world. Simplest "test" way is to add it to the TreasureTable ID 164 "Cryo Idle Loot". It will be lying on the ground of the Cryo Facility, along with shards of glass, on the next time you start the game with that mod.

When you're sure it works, you will then need to modify some exitsting TreasureTable for loot, so that the new item ocassionally "drops" in-game.


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Exactly how would I add my item to this treasuretable?

<Table name="treasuretable"> <column name="id">164</column> <column name="strName">cryo idle loot</column> <column name="aTreasures">0.0x0x1-1,86.6x1.0x5-9</column> <column name="bNested">0</column> <column name="bSuppress">0</column> <column name="bIdentify">0</column>

in the aTreasures part, add your item after the coma. The format is: Group . subGroup x chance x number of items.

So: "86.6x1.0x5-9" means, item from Group 86, subGroup 6, with 100% chance to show up (1.0 = 100%, 0.36 = 36%, etc.) and between 5 and 9 of them, total.

If the entries in the aTreasures are separated by comas (","), it means "and" so each item added will also be generated whenever the game calls for that TreasureTable. Example:

3.1x1.0x1-1,86.6x1.0x5-9,12.3x0.3x1-2 means:
100% chance for one item 3.1 (Group 3, subGroup 1) and 100% chance for between 5 and 9 items 86.1 and 30% chance for between one and two items 12.3.

If the entries are separated by those vertical line signs ("|"), it means "or" instead. In that cases, a total chance for all entries must be 100%, and only one will be generated, depending on random roll. Example:

3.1x0.3x1-1|86.6x0.3x5-9|12.3x0.4x1-2 (notice that total chance is 100%) means:

30% chance for one 3.1 or 30% chance for 5-9 of 86.6 or 40% chance for 1-2 of item 12.3


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

AS far as i can tell from NSE TT: Total chance doesn't have to be 100% at sum (NSE have some of TTs with sum. chance over 150% and they are still working)


EXE Patchwork m(onster)od.

The total can be greater than 100% and the game won't return any errors, but anything beyond 100% (the stuff at the end of the aTreasures block) will be ignored and will never generate. I had to work this out the hard way as I didn't read the existing documentation.

If you're merging mods that add lots of items to the same treasuretables, prepare to do a bunch of arithmetic.

One exception to this is if you have one option that starts below the 100% sum and extends beyond it, it'll still appear a fraction of the time.

E.g. if there are 5 items in the loot list:
1 - 15%
2 - 25%
3 - 35%
4 - 50%
5 - 25%

Items 1-3 will each appear the specified amounts, and #4 will only appear 25% of the time (100 - 15 - 25 - 35 = 25). #5 will not appear at all.

But yeah, if you have long lists of items, it can be a real pain to manage. I have excel spreadsheets setup to help with some of the longer lists so that the totals are accurate!

Dan Fedor - Founder, Blue Bottle Games

I give up... I have don't know what I'm doing wrong... Everything most likely.

IMAGE(http://i62.tinypic.com/1zougb8.png)

neogame.xml

Spoiler: Highlight to view
<?xml version="1.0" encoding="utf-8"?> <!-- - phpMyAdmin XML Dump - version 3.4.0 - http://www.phpmyadmin.net - - Host: localhost - Generation Time: Jun 04, 2014 at 02:16 PM - Server version: 5.6.16 - PHP Version: 5.2.17 --> <pma_xml_export version="1.0"> <!-- - Database: 'neogame' --> <database name="neogame"> <!-- Table attackmodes --> <table name="attackmodes"> <column name="id">1</column> <column name="strName">Buster Sword</column> <column name="strNotes"></column> <column name="nRange">6</column> <column name="fDamageCut">2.5</column> <column name="fDamageBlunt">0.5</column> <column name="strChargeProfiles"></column> <column name="nPenetration">1</column> <column name="nType">0</column> <column name="strSnd">cueBlade</column> <column name="bTransfer"></column> <column name="vAttackerConditions"></column> <column name="strIMG">AModeBuster.png</column> <column name="fMorale">0.09</column> <column name="strWieldPhrase">Pulling out your sword, it smashes to the ground</column> <column name="vAttackPhrases">swings at,thrusts at, slices at</column> </table> <!-- Table itemtypes --> <table name="itemtypes"> <column name="id">1</column> <column name="nGroupID">21</column> <column name="nSubgroupID">1</column> <column name="strName">sword</column> <column name="strDesc">steel buster sword</column> <column name="strDescAlt"></column> <column name="nCondID">0:1</column> <column name="vImageList">ItmBusterStored.png,ItmBusterHeld.png</column> <column name="vSpriteList">20=CreItmBusterHeldL.png,21=CreItmBusterHeldR.png</column> <column name="vImageUsage">0,0,0,0,1,1</column> <column name="fWeight">12.4</column> <column name="fMonetaryValue">90500</column> <column name="fMonetaryValueAlt">0</column> <column name="fDurability">1</column> <column name="fDegradePerHour">0</column> <column name="fEquipDegradePerHour">0.0000</column> <column name="fDegradePerUse">0</column> <column name="vDegradeTreasureIDs"></column> <column name="aEquipConditions"></column> <column name="aPossessConditions"></column> <column name="aUseConditions"></column> <column name="aCapacities"></column> <column name="vEquipSlots">21=1=1,20=1=1</column> <column name="vUseSlots"></column> <column name="bSocketLocked">0</column> <column name="vProperties">0:9,0:10,0:13,0:16,0:18,0:21,0:28,0:48,0:50,0:87</column> <column name="aContentIDs"></column> <column name="nFormatID">0:3</column> <column name="nTreasureID">0:0</column> <column name="nComponentID">0:3</column> <column name="bMirrored">0</column> <column name="nSlotDepth">0</column> <column name="strChargeProfiles"></column> <column name="aAttackModes">20=5,21=5</column> <column name="nStackLimit">1</column> <column name="aSwitchIDs"></column> <column name="aSounds">0:cueSwordUnSheathing,0:cueMetalClangHit2</column> </table> <!-- Table treasuretable --> <table name="treasuretable"> <column name="id">164</column> <column name="strName">cryo idle loot</column> <column name="aTreasures">0.0x0x1-1,21.1x1.0x5-9</column> <column name="bNested">0</column> <column name="bSuppress">0</column> <column name="bIdentify">0</column> </table> </database> </pma_xml_export>

Well, not everything - just most of it :D

Seriously though, the error comes from the TreasureTable. Overwriting anything from the main game, as opposed to adding any new data, needs to come from another, "zero mod" (that is why all the vanilla data in your mod are marked as "0:". So your mod must in fact consist of two things - your own mod, which contains all the new stuff and the overwrite mod, which contains all the changes to the vanilla game.

In the case of what you posted, the treasure table ID 164 is a part of the vanilla game so needs to be in a overwrite mod. Just look at the SampleMod that the game comes included with, to see how it should work. Just keep in mind that the overwrite mod uses the tags in a reversed way - so in your mod, all the vanilla data is marked with "0:" and your own stuff does not need to be marked. And in the overwrite mod, the vanilla stuff does not need to be marked, but any of your data is marked by the tag you gave your mod, in the "getmods.php" file.


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

It's almost like I need a full on video tutorial, or thread that describes what all the tables do and the mechanics of each column within that table. A guide that can be explained to someone with zero coding/modding experience.