[Modding] R&D and current findings

Discuss and distribute tools and methods for modding. Moderator - Grognak
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: [Modding] R&D and current findings

Postby Whale Cancer » Wed Sep 26, 2012 5:38 am

swixel wrote:
chronial wrote:There must be something hardcoded. The Pirateships are defined like this:

Code: Select all

<blueprintList name="SHIPS_PIRATE">
   <name>JELLY_BUTTON</name>
   <name>JELLY_CROISSANT</name>
   …
   <name>ZOLTAN_FIGHTER</name>
   <name>ZOLTAN_BOMBER</name>
</blueprintList>

These are the names of the normal ships. There is nothing to explain the different skin for the pirate ships in the xml.


And that's ... fantastic. Except that SHIPS_PIRATE isn't in the string table; SHIPS_REBEL is, but that's rebels. Which is also used for something related ...

Code: Select all

<ship name="PIRATE_SLAVER" auto_blueprint="SHIPS_PIRATE">


I think you may be looking in the wrong place with resolving this. Just trace the strings back and you should find it pretty quickly. I'm not saying it's *not* hardcoded, but if it is, it's not to SHIPS_PIRATE, but to something else higher upstream. Even then, default crewing isn't something they appear to have hardcoded anywhere.


It appears to be that using _PIRATE in a the blueprint names list ends up appending it to the img tag (and perhaps elsewhere).

I've since renamed all the pirate stuff I am using OUTCAST and am experiencing no unexplained crashes.
Contribute to help save the Whales from their various diseases! *DELAYED* Should release the skeleton with the main quests attached by the end of the week (By NOV 9)! *DELAYED* Don't listen to my dates! Things always seem to come up!
a__gun
Posts: 9
Joined: Fri Sep 21, 2012 7:55 pm

Re: [Modding] R&D and current findings

Postby a__gun » Wed Sep 26, 2012 11:03 am

Rivers wrote:This may seem too simple, but how do you change your starting ships to have your choice of weapons/augmentation at the beginning?

I've gone through a lot of modding threads and they have discussion of elaborate things like adding in your own custom weapons with customized stats, but how about just giving your ship already pre-existing weapons at the beginning of the game?


In data.dat is a file called blueprints.xml. This contains all the starting details of every ship, as well as weapon and augment details. From this you can get the names of weapons and augments and add them to a ships loadout.
chronial
Posts: 15
Joined: Tue Sep 25, 2012 12:17 am

Re: [Modding] R&D and current findings

Postby chronial » Wed Sep 26, 2012 12:57 pm

And that's ... fantastic. Except that SHIPS_PIRATE isn't in the string table; SHIPS_REBEL is, but that's rebels. Which is also used for something related ...

Code: Select all

<ship name="PIRATE_SLAVER" auto_blueprint="SHIPS_PIRATE">


I think you may be looking in the wrong place with resolving this. Just trace the strings back and you should find it pretty quickly. I'm not saying it's *not* hardcoded, but if it is, it's not to SHIPS_PIRATE, but to something else higher upstream. Even then, default crewing isn't something they appear to have hardcoded anywhere.

SHIPS_PIRATE is not in the strings table, but "_pirate" is. And if you look at the data files, you will also find stuff like

Code: Select all

<blueprintList name="SHIPS_ROCK">
   <name>ROCK_SCOUT</name>
   <name>ROCK_FIGHT</name>
   <name>ROCK_ASSAULT</name>
</blueprintList>
<blueprintList name="SHIPS_ROCK_PIRATE">
   <name>ROCK_SCOUT</name>
   <name>ROCK_FIGHT</name>
</blueprintList>


This is not about crewing, but about styling. The blueprint for ROCK_SCOUT names "rock_scout" as it’s base image, and looking for images with that name yields these results:

Code: Select all

img/ship/rock_scout_gib3.png
img/ship/rock_scout_gib1.png
img/ship/rock_scout_base.png
img/ship/rock_scout_gib2.png
img/ship/rock_scout_gib4.png
img/ship/rock_scout_cloak.png
img/ship/rock_scout_pirate_cloak.png
img/ship/rock_scout_pirate_gib3.png
img/ship/rock_scout_pirate_gib4.png
img/ship/rock_scout_pirate_base.png
img/ship/rock_scout_pirate_gib1.png
img/ship/rock_scout_pirate_gib2.png

I’d say it’s rather obvious what’s happening here :)
Last edited by chronial on Wed Sep 26, 2012 3:45 pm, edited 1 time in total.
piper82
Posts: 11
Joined: Wed Sep 19, 2012 1:28 pm

Re: [Modding] R&D and current findings

Postby piper82 » Wed Sep 26, 2012 2:53 pm

im currently working on a ship so i need to find out some things.

1. is it possible to adjust thruster position?

2. is it possible to change number of thrusters?

3. i know there is a thruster sprite sheet but is it possible to make another one and assign it to ship without messing with the original one?

thanks
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: [Modding] R&D and current findings

Postby Whale Cancer » Wed Sep 26, 2012 3:12 pm

piper82 wrote:im currently working on a ship so i need to find out some things.

1. is it possible to adjust thruster position?

2. is it possible to change number of thrusters?

3. i know there is a thruster sprite sheet but is it possible to make another one and assign it to ship without messing with the original one?

thanks

Sadly: (1) no, (2), no, and (3) no.
Contribute to help save the Whales from their various diseases! *DELAYED* Should release the skeleton with the main quests attached by the end of the week (By NOV 9)! *DELAYED* Don't listen to my dates! Things always seem to come up!
piper82
Posts: 11
Joined: Wed Sep 19, 2012 1:28 pm

Re: [Modding] R&D and current findings

Postby piper82 » Wed Sep 26, 2012 3:19 pm

Whale Cancer wrote:
piper82 wrote:im currently working on a ship so i need to find out some things.

1. is it possible to adjust thruster position?

2. is it possible to change number of thrusters?

3. i know there is a thruster sprite sheet but is it possible to make another one and assign it to ship without messing with the original one?

thanks

Sadly: (1) no, (2), no, and (3) no.


well, there goes my four engine ion propulsion idea :D
im going to take a ship without visible thrusters and fake it on the ship image

thanks
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: [Modding] R&D and current findings

Postby Whale Cancer » Wed Sep 26, 2012 3:53 pm

piper82 wrote:
Whale Cancer wrote:
piper82 wrote:im currently working on a ship so i need to find out some things.

1. is it possible to adjust thruster position?

2. is it possible to change number of thrusters?

3. i know there is a thruster sprite sheet but is it possible to make another one and assign it to ship without messing with the original one?

thanks

Sadly: (1) no, (2), no, and (3) no.


well, there goes my four engine ion propulsion idea :D
im going to take a ship without visible thrusters and fake it on the ship image

thanks

Here's to hoping this gets changed in a 'modder's update'; I couldn't imagine moving the code that only has to control (1) thruster sprite and (2) offsetting to the XML would be that much of an effort.
Contribute to help save the Whales from their various diseases! *DELAYED* Should release the skeleton with the main quests attached by the end of the week (By NOV 9)! *DELAYED* Don't listen to my dates! Things always seem to come up!
Rivers
Posts: 14
Joined: Wed Sep 26, 2012 3:58 am

Re: [Modding] R&D and current findings

Postby Rivers » Thu Sep 27, 2012 6:59 am

a__gun wrote:
Rivers wrote:This may seem too simple, but how do you change your starting ships to have your choice of weapons/augmentation at the beginning?

I've gone through a lot of modding threads and they have discussion of elaborate things like adding in your own custom weapons with customized stats, but how about just giving your ship already pre-existing weapons at the beginning of the game?


In data.dat is a file called blueprints.xml. This contains all the starting details of every ship, as well as weapon and augment details. From this you can get the names of weapons and augments and add them to a ships loadout.


Yes, I get the concept/logic I think.

This is what I did:

Image

Is it that simple? Am I missing something else I need to do?

As I said, after saving the data.file and starting the game it only reach up to the loading screen then crashes, with a message along the lines of C++ runtime error etc.
User avatar
Kieve
Posts: 952
Joined: Tue Sep 18, 2012 2:21 pm

Re: [Modding] R&D and current findings

Postby Kieve » Thu Sep 27, 2012 7:13 am

What's the "|"in your Weapon_PreIgnite line? Is that the cursor or did a typo slip in while you were adding that?
As I discovered tonight, all these XML scripts are hypersensitive to bad syntax. Forget one forward-slash closing tag or include an extra quotation mark and suddenly the whole game goes to hell in a handbasket. :roll:
swixel
Posts: 80
Joined: Mon Sep 17, 2012 6:08 am

Re: [Modding] R&D and current findings

Postby swixel » Thu Sep 27, 2012 7:36 am

chronial wrote:SHIPS_PIRATE is not in the strings table, but "_pirate" is. And if you look at the data files, you will also find stuff like


So it is ... I've been looking at the Mac binary (for various reasons), and it's not referenced. Looking at Windows and Linux builds it would appear that the one you really want is just "PIRATE". In any case, while it's in the CreateShip member function, in which _pirate is appended, and random is assigned (next string reference). While, yes, there's something hardcoded, it's hardly useful unless you want to detour the function.