Ship modding

Started by Medevac, April 06, 2015, 11:06:42 AM

Medevac

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.

Strmy

i do it that i replace the begginer ship :-)

Medevac

So I would have to give it <id>hull_shuttle</id>?

loudent

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 <>)

Lurler

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

Pinkeh

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.

Ferro70

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>


Medevac

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 ;)

loudent

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.

Hammish

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.

Ohfive30

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.

MechaTith

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?

Silberspeer

#12
Is your mod turned on at the Mods menu?

MechaTith

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.

ai_enabled

MechaTith, please upload the mod and we will check it.