AtomicTorch Studio Forums

VoidExpanse => Modding info => Topic started by: Medevac on April 06, 2015, 11:06:42 AM

Title: Ship modding
Post by: Medevac on April 06, 2015, 11:06:42 AM
Hello,

I am working on a mod that will add some new ships to the game, but I ran into a problem. Is there an easy way to access ships ingame, so I can test the ships I add?
Because for now, I have to search in shops and hope one of them sells the ship I added.

Like some command line that spawns the ship in your inventory or savegame edit.

Thanks in advance.
Title: Re: Ship modding
Post by: Strmy on April 06, 2015, 11:08:02 AM
i do it that i replace the begginer ship :-)
Title: Re: Ship modding
Post by: Medevac on April 06, 2015, 11:20:55 AM
So I would have to give it <id>hull_shuttle</id>?
Title: Re: Ship modding
Post by: loudent on April 06, 2015, 12:28:37 PM
Quote from: Medevac on April 06, 2015, 11:06:42 AM
Like some command line that spawns the ship in your inventory or savegame edit.

Not sure about the steam version but the downloaded version had a way to do that. hit enter to get the chat line and type /additem <id>  where <id> is the id of your hull (without the <>)
Title: Re: Ship modding
Post by: Lurler on April 06, 2015, 11:20:25 PM
If I'm not mistake it's

/item_add <item_id> <how_many>

But you have to do it in a station or you will bugg the game :)

You can find more info on our wiki here: http://wiki.atomictorch.com/Main_Page
Title: Re: Ship modding
Post by: Pinkeh on April 07, 2015, 03:19:35 AM
I've been spawning them with a new character xml.

Directory

data\characters\test-spawning.xml

This is the one i used for my battleship with weapons/mods/etc.

test-spawning.xml:


<?xml version="1.0" encoding="utf-8"?>
<root>
<header>
<id>test-spawning</id>
<title>Spawn Civilian Minerva</title>
<description>This is used to test the Minerva ship mod to ensure it is working as intended. You will start a new game in the Minerva dreadnaught and some basic equipment.</description>
<enabled>1</enabled>
</header>

<data>

<!-- starting money -->
<money>10000</money>

<ship>
<equipment>
<!-- basic items -->
<hull>hull_minerva</hull>
<engine>engine_civilian</engine>
<rcs>rcs_civilian</rcs>
<fueltank>fueltank_civilian</fueltank>
<generator>generator_civilian</generator>
<shield>shield_civilian</shield>
<radar>radar_civilian</radar>
<grappler>grappler_civilian</grappler>

<boosters>
<!-- none -->
</boosters>

<consumables>
<!-- none -->
</consumables>

<devices>
<!-- none -->
</devices>

<weapons>
<weapon>
<slot>0</slot>
<weapon>weapon_mlrs_gc30xs</weapon>
</weapon>
<weapon>
<slot>1</slot>
<weapon>weapon_laser_heavy</weapon>
</weapon>
<weapon>
<slot>2</slot>
<weapon>weapon_laser_heavy</weapon>
</weapon>
<weapon>
<slot>3</slot>
<weapon>weapon_mlrs_gc30xs</weapon>
</weapon>
</weapons>
</equipment>

<items>
<!-- none -->
</items>

<cargo>
<!-- none -->
</cargo>
</ship>

<skill_points>0</skill_points>
<skills>
<!-- none -->
</skills>
</data>
</root>


It's frustrating tho because if you don't have the correct ids the game will freak out. Might try the command line option now.

The advantage of having it in place is to let people test your mods without having to go look for the ids or looking for them in the store. You can just let them spawn in the exact configuration of equipment you intend. It's up to them if they want to stick with your test-class or find/earn it themselves

This method also bypasses any restrictions caused by skills / incorrect mounts.
Title: Re: Ship modding
Post by: Ferro70 on April 08, 2015, 03:25:27 AM
Quote from: Lurler on April 06, 2015, 11:20:25 PM
If I'm not mistake it's

/item_add <item_id> <how_many>

But you have to do it in a station or you will bugg the game :)

You can find more info on our wiki here: http://wiki.atomictorch.com/Main_Page

actually its /additem <id> <amount>
Quote from: example/additem hull_minerva 1

the ID's you actually find in the content config XML as <id>name here</id>

Title: Re: Ship modding
Post by: Medevac on April 19, 2015, 10:36:05 AM
Thanks a lot for all the help, the chat command indeed worked. Next question, I can start a game with my mod, spawn the ship and equip this ship. All the stats I modified are correct, except that the ship is invisible (I can fly around in it, you only see engine trails). Anything obvious I missed, or did I mess something up with the textures/object?

Thanks again in advance ;)
Title: Re: Ship modding
Post by: loudent on April 19, 2015, 11:01:23 AM
Quote from: Medevac on April 19, 2015, 10:36:05 AM
the ship is invisible (I can fly around in it, you only see engine trails). Anything obvious I missed, or did I mess something up with the textures/object?

That's impossible to know without seeing the .xml but it certain does appear that you messed something up.
Title: Re: Ship modding
Post by: Hammish on April 19, 2015, 08:05:24 PM
Is the ship invisible, or straight black and looks invisible for the most part?

If it's black with no skin, that's an issue with your UV layer.

Hell, even with a straight invisible ship I'd check the UV layer and materials.  Sounds like the texture isn't applying properly.
Title: Re: Ship modding
Post by: Ohfive30 on April 19, 2015, 11:29:06 PM
Quote from: Medevac on April 19, 2015, 10:36:05 AM
Thanks a lot for all the help, the chat command indeed worked. Next question, I can start a game with my mod, spawn the ship and equip this ship. All the stats I modified are correct, except that the ship is invisible (I can fly around in it, you only see engine trails). Anything obvious I missed, or did I mess something up with the textures/object?

Thanks again in advance ;)

I had this problem initially with the models I've done, I found it was to do with export settings for exporting to obj format. on the modding info forum somewhere there's a screenshot of the settings you should use to export an obj from blender, I found that using these exact settings fixed my invisible ship problem. I've since found working settings for exporting directly from Maya.
Title: Re: Ship modding
Post by: MechaTith on July 19, 2015, 04:58:07 PM
I got my mod to install to the game without error, but when I use /add_item or /additem I get an error saying the item doesn't exist. How do I find out if my mod is installed correctly?
Title: Re: Ship modding
Post by: Silberspeer on July 19, 2015, 09:27:53 PM
Is your mod turned on at the Mods menu?
Title: Re: Ship modding
Post by: MechaTith on July 20, 2015, 10:31:24 AM
Yes, I enabled it. I also tried to disable it and re enable it again. Also, I restarted the game after that I did that.
Title: Re: Ship modding
Post by: ai_enabled on July 20, 2015, 07:58:50 PM
MechaTith, please upload the mod and we will check it.
Title: Re: Ship modding
Post by: MechaTith on July 21, 2015, 09:59:54 AM
I copied it to my dropbox
https://dl.dropboxusercontent.com/u/33948896/HereticMk2.mpk (https://dl.dropboxusercontent.com/u/33948896/HereticMk2.mpk)