Discuss and distribute tools and methods for modding. Moderator - Grognak
bamalf
Posts: 204 Joined: Wed Dec 17, 2014 12:57 pm
Post
by bamalf » Wed Dec 17, 2014 1:26 pm
I have working custom weapon and custom enemy ship, but the ship starting without any weapons.
Code: Select all
<shipBlueprint name="BS_ROCK_OUTPOST" layout="bs_rock_outpost" img="bs_rock_station_b">
<class>Rock outpost</class>
<systemList>
<medbay power="1" max="3" room="4" start="false"/>
<doors power="3" max="3" room="0" start="true"/>
<oxygen power="1" max="3" room="5" start="true"/>
<shields power="8" max="8" room="1" start="true"/>
<weapons power="4" max="8" room="3" start="true"/>
</systemList>
<weaponList missiles="0" load="WEAPONS_ROCK_PRO"/>
<health amount="20"/>
<maxPower amount="19"/>
<crewCount amount="5" max="7" class="rock"/>
<aug name="ROCK_ARMOR"/>
<boardingAI>sabotage</boardingAI>
</shipBlueprint>
<blueprintList name="WEAPONS_ROCK_PRO">
<name>SOLAR_BARRAGE_ARRAY</name>
</blueprintList>
stylesrj
Posts: 3638 Joined: Tue Jul 08, 2014 7:54 am
Post
by stylesrj » Wed Dec 17, 2014 6:32 pm
<blueprintList name="WEAPONS_ROCK_PRO">
<name>SOLAR_BARRAGE_ARRAY</name>
</blueprintList>
I think you'll need a lot more than just a name if you want that weapon to show up and be used on the Rock ship.
You need things like charge time, firing animations, damage, cost.
In fact, look up a weapon in blueprints.xml, copy that and change the values there.
bamalf
Posts: 204 Joined: Wed Dec 17, 2014 12:57 pm
Post
by bamalf » Wed Dec 17, 2014 7:06 pm
The weapon already exists, I can add it on own ship, but not on the enemy. I got solve the problem:
Code: Select all
<shipBlueprint name="BS_ROCK_OUTPOST" layout="bs_rock_outpost" img="bs_rock_station_b">
<class>Rock outpost</class>
<systemList>
<medbay power="1" max="3" room="4" start="false"/>
<doors power="3" max="3" room="0" start="true"/>
<oxygen power="1" max="3" room="5" start="true"/>
<shields power="8" max="8" room="1" start="true"/>
<weapons power="4" max="8" room="3" start="true"/>
</systemList>
<weaponList count="1" missiles="0">
<weapon name="SOLAR_BARRAGE_ARRAY"/>
</weaponList>
<health amount="20"/>
<maxPower amount="19"/>
<crewCount amount="5" max="7" class="rock"/>
<aug name="ROCK_ARMOR"/>
<boardingAI>sabotage</boardingAI>
</shipBlueprint>
stylesrj
Posts: 3638 Joined: Tue Jul 08, 2014 7:54 am
Post
by stylesrj » Wed Dec 17, 2014 7:15 pm
The weapon already exists, I can add it on own ship, but not on the enemy. I got solve the problem:
When you put the blueprint for it outside of the ship blueprint, I assumed the weapon wasn't working because you just gave it a name.
Has the custom ship got weapon mounts?
bamalf
Posts: 204 Joined: Wed Dec 17, 2014 12:57 pm
Post
by bamalf » Wed Dec 17, 2014 7:26 pm
Yes, other sets of weapons (e. g. <blueprintList name="WEAPONS_ROCK">) works correctly, weapons at random are chosen from list.
stylesrj
Posts: 3638 Joined: Tue Jul 08, 2014 7:54 am
Post
by stylesrj » Wed Dec 17, 2014 9:13 pm
Well that's all I know from the script... I mean that's as far as my knowledge of modding takes me. I've never actually modded an enemy ship before so I don't know how weapons and mounts work for them. Perhaps someone else will know the issue.
Gencool
Posts: 409 Joined: Sun Jun 16, 2013 1:21 pm
Post
by Gencool » Fri Dec 19, 2014 4:09 am
Did you get this working then?
My only observation is that the original code has a line that reads
Code: Select all
<weaponList missiles="0" load="WEAPONS_ROCK_PRO"/>
where it probably should be
Code: Select all
<weaponList count="1" missiles="0" load="WEAPONS_ROCK_PRO"/>
((I'm not sure what happens if you don't have the count tag, but it *might* mean you don't get any weapons))
bamalf
Posts: 204 Joined: Wed Dec 17, 2014 12:57 pm
Post
by bamalf » Fri Dec 19, 2014 9:35 am
It works, but other enemies did not have "count" in their weaponLists. I'm confused.
kartoFlane
Posts: 1488 Joined: Mon Jan 14, 2013 10:20 pm
Post
by kartoFlane » Sun Dec 21, 2014 3:02 pm
Proud American Engi wrote: You can make your own weapons list with ONLY your custom weapon , But the ship will have 1-4 of that weapon because you cant make it so that enemy always has the same loadout no matter what!
Actually, you can. The weaponList tag in enemy ships accepts both blueprintLists (via the 'load' attribute), as well as specific weapons listed like in player ships.
At least IIRC, I tested this way before AE...
The 'count' attribute specifies the number of weapons that will be drafted from the list for the ship to use. Generally this should be equal to number of weapon slots on the ship. IIRC omitting this will cause the game to always draft the maximum number of weapons for the ship (ie. count = number of weapon slots)
kartoFlane
Posts: 1488 Joined: Mon Jan 14, 2013 10:20 pm
Post
by kartoFlane » Tue Dec 23, 2014 12:28 pm
Well, like I said, you simply do it the same way you do it for player ships, so...
Code: Select all
<weaponList count="2" missiles="#">
<weapon name="WEAPON_1" />
<weapon name="WEAPON_2" />
</weaponList>
It may or may not work like that anymore -- as I said, I've tested this before the AE update.