Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: XML help: my AS12 is jammed  (Read 1270 times)

KA101

  • Bay Watcher
    • View Profile
XML help: my AS12 is jammed
« on: December 23, 2012, 11:29:22 pm »

As in, its code seems to be screwing up the file: weapons.xml refuses to load with it in.  I used the shotgun_pump code as a template, with some help from the various auto-weapons.  I'm sure the problem is something trivial, but can't for the life of me figure it out right now.  Would appreciate outside checking & input.

Here's the code:
Code: [Select]
<weapontype idname="WEAPON_SHOTGUN_AS12">
        <name>AS12 Assault SG</name>
        <name_future>HvyPlasmaBurstgun</name_future>
        <shortname>AS12</shortname>
        <shortname_future>HvyBrst</shortname_future>
        <can_take_hostages>true</can_take_hostages>
        <threatening>true</threatening>
        <legality>-1</legality>
        <fencevalue>600</fencevalue>
        <bashstrengthmod>125</bashstrengthmod>
        <size>15</size>
        <attack>
            <priority>1</priority>
            <ranged>true</ranged>
            <attack_description>shoots at</attack_description>
            <skill>SHOTGUN</skill>
            <ammotype>CLIP_AS12</ammotype>
            <random_damage>201</random_damage>
            <fixed_damage>10</fixed_damage>
            <shoots>true</shoots>
            <bleeding>true</bleeding>
            <damages_armor>true</damages_armor>
            <armorpiercing>0</armorpiercing>
<number_attacks>2<number_attacks>
            <accuracy_bonus>1</accuracy_bonus>
<successive_attacks_difficulty>2</successive_attacks_difficulty>
            <critical>
                <chance>50</chance>
<hits_required>2</hits_required>
                <random_damage>301</random_damage>
                <fixed_damage>10</fixed_damage>
                <severtype>NASTY</severtype>
            </critical>
        </attack>
        <attack>
            <priority>2</priority>
            <attack_description>swings at</attack_description>
            <skill>CLUB</skill>
            <strength_min>6</strength_min>
            <strength_max>12</strength_max>
            <random_damage>21</random_damage>
            <fixed_damage>5</fixed_damage>
            <bruises>true</bruises>
        </attack>
    </weapontype>

If anyone's interested in the theory: I felt that Shotgun skill needed something to make it competitive at C & C+ Gun Control.  The AS12 fires two-shot bursts, can be fired ten times before reloading, has a 50% crit rate once both shells connect, and isn't concealable.  Hopefully the double-shots and increased crit rate help offset shotguns' negligible penetration.  Gun is purchasable for $1200 (between MP5 & AK47); ammo is $60/drum.  (12g tubefeed for the pump gun costs $25/6 shells in the XML, so I think that $60 is fairly in line for 20 shells & drum mag.)  Wouldn't know how to issue it to CCS/military/corp raid-mercs, the potential non-LCS markets.

(I've written corresponding code in clips & armsdealer.  clips loads--I neglected to close a tag there, fixed--and no idea re armsdealer.)

Thank you for your time, consideration, and hopefully assistance.
Logged

Carlos Gustavos

  • Bay Watcher
    • View Profile
Re: XML help: my AS12 is jammed
« Reply #1 on: December 24, 2012, 06:24:37 am »

You haven't properly closed the number_attacks tag. The / is missing. I recommend trying an xml validator when you have problems with xml, eg www.w3schools.com/xml/xml_validator.asp.
Logged

Funk

  • Bay Watcher
    • View Profile
Re: XML help: my AS12 is jammed
« Reply #2 on: December 24, 2012, 09:56:49 am »

you will need to change the code to issue it to npcs.
Logged
Agree, plus that's about the LAST thing *I* want to see from this kind of game - author spending valuable development time on useless graphics.

Unofficial slogan of Bay 12 Games.  

Death to the false emperor a warhammer40k SG

KA101

  • Bay Watcher
    • View Profile
Re: XML help: my AS12 is jammed
« Reply #3 on: December 24, 2012, 12:09:46 pm »

Gagh.  Knew it was something trivial.  Thanks for the find & the link, Carlos Gustavos, and NPC-coding is in the compiler-required section of things IIRC so it's outside my capacity for the foreseeable future.

Any thoughts on the theory?
Logged

Donuts

  • Bay Watcher
  • Legendary Madman
    • View Profile
Re: XML help: my AS12 is jammed
« Reply #4 on: January 01, 2013, 09:18:15 am »

Shotgun got helluvalot punch-for-the-price. Is it even fun to play with such overpowered awesomeness? :P
Logged
"Oh shit, they've got a slogan! It means they're serious!"

KA101

  • Bay Watcher
    • View Profile
Re: XML help: my AS12 is jammed
« Reply #5 on: January 01, 2013, 01:57:11 pm »

Wouldn't know: haven't actually bought one yet in my game.  They shouldn't yet show as loot, nor should hostiles be carrying them, so you're paying for every shot.   Is it capable of incapacitating hostiles wearing Army armor, given a wielder with 6+ Shotgun skill?  If so, that's the general idea.  If not...then it's actually too weak.  Pricing is a valid concern but once hostiles (especially CCS) carry them...it goes right out the window.  Ask me how many loaded .44 Magnums I got from safehouse-raiding.

Possible tweak areas would be mag cost, accuracy modifier/burst penalty, & crit rate; 50% once both shots hit was probably a bit high, but then I wasn't sure how effective the armor would be.
Logged

Donuts

  • Bay Watcher
  • Legendary Madman
    • View Profile
Re: XML help: my AS12 is jammed
« Reply #6 on: January 01, 2013, 02:01:10 pm »

Wouldn't know: haven't actually bought one yet in my game.  They shouldn't yet show as loot, nor should hostiles be carrying them, so you're paying for every shot.   Is it capable of incapacitating hostiles wearing Army armor, given a wielder with 6+ Shotgun skill?  If so, that's the general idea.  If not...then it's actually too weak.  Pricing is a valid concern but once hostiles (especially CCS) carry them...it goes right out the window.  Ask me how many loaded .44 Magnums I got from safehouse-raiding.

Possible tweak areas would be mag cost, accuracy modifier/burst penalty, & crit rate; 50% once both shots hit was probably a bit high, but then I wasn't sure how effective the armor would be.
It can quite possibly kill everything except for tanks in a single shot. You should boost the price a lot.
Edit: You should also reduce critical hit chance, with 6 shotgun skill you can easily hit all 3 times.
« Last Edit: January 01, 2013, 02:03:11 pm by Donuts »
Logged
"Oh shit, they've got a slogan! It means they're serious!"

KA101

  • Bay Watcher
    • View Profile
Re: XML help: my AS12 is jammed
« Reply #7 on: January 01, 2013, 02:19:50 pm »

Wouldn't know: haven't actually bought one yet in my game.  They shouldn't yet show as loot, nor should hostiles be carrying them, so you're paying for every shot.   Is it capable of incapacitating hostiles wearing Army armor, given a wielder with 6+ Shotgun skill?  If so, that's the general idea.  If not...then it's actually too weak.  Pricing is a valid concern but once hostiles (especially CCS) carry them...it goes right out the window.  Ask me how many loaded .44 Magnums I got from safehouse-raiding.

Possible tweak areas would be mag cost, accuracy modifier/burst penalty, & crit rate; 50% once both shots hit was probably a bit high, but then I wasn't sure how effective the armor would be.
It can quite possibly kill everything except for tanks in a single shot. You should boost the price a lot.
Edit: You should also reduce critical hit chance, with 6 shotgun skill you can easily hit all 3 times.
Huh? it should only have a two-shot burst.  Will check on that.

Base damage output & (lack of) armor-penetration is direct from the pump gun so the only boosts to damage should be the second shot & crit-enhancement.  Thus I'm not sure how it's killing CCS Bosses in one shell, let alone two.  Hopefully it dings up their Heavy armor so another shooter can get to their HP.
Logged

Donuts

  • Bay Watcher
  • Legendary Madman
    • View Profile
Re: XML help: my AS12 is jammed
« Reply #8 on: January 01, 2013, 02:20:32 pm »

Wouldn't know: haven't actually bought one yet in my game.  They shouldn't yet show as loot, nor should hostiles be carrying them, so you're paying for every shot.   Is it capable of incapacitating hostiles wearing Army armor, given a wielder with 6+ Shotgun skill?  If so, that's the general idea.  If not...then it's actually too weak.  Pricing is a valid concern but once hostiles (especially CCS) carry them...it goes right out the window.  Ask me how many loaded .44 Magnums I got from safehouse-raiding.

Possible tweak areas would be mag cost, accuracy modifier/burst penalty, & crit rate; 50% once both shots hit was probably a bit high, but then I wasn't sure how effective the armor would be.
It can quite possibly kill everything except for tanks in a single shot. You should boost the price a lot.
Edit: You should also reduce critical hit chance, with 6 shotgun skill you can easily hit all 3 times.
Huh? it should only have a two-shot burst.  Will check on that.

Base damage output & (lack of) armor-penetration is direct from the pump gun so the only boosts to damage should be the second shot & crit-enhancement.  Thus I'm not sure how it's killing CCS Bosses in one shell, let alone two.  Hopefully it dings up their Heavy armor so another shooter can get to their HP.
Ah sorry, I thought about my own AA12, it uses a 3 round burst. >_<
But 50% crit chance is too much, you can easily rip enemies apart in one turn, depending on skill and how many people equipped with it.
« Last Edit: January 01, 2013, 02:23:06 pm by Donuts »
Logged
"Oh shit, they've got a slogan! It means they're serious!"

KA101

  • Bay Watcher
    • View Profile
Re: XML help: my AS12 is jammed
« Reply #9 on: January 01, 2013, 02:31:55 pm »

Well, that's reasonable.  6 skilled Liberals with M4s can rip apart one or maybe two CCS Bosses in a turn.  I was afraid one Liberal with the weapon could reliably kill a CCS Boss by xyrself--that would be overpowered.  Will see about reducing the crit chance.
Logged