Adding Content to Mod (Using SporeMaster)

The place for mod discussions and seeking out information about Spore modding.
Forum rules
Can't get a mod to work?
Try these... FIRST!

http://www.davoonline.com/phpBB3/viewforum.php?f=6
User avatar
ajsmith21
Cell
Cell
Posts: 6
Joined: Tue Oct 17, 2017 1:17 am

Adding Content to Mod (Using SporeMaster)

Unread post by ajsmith21 »

So, I know how to edit a mod, and even edit already existing xml files in the base game (I have been programming for over 16 years now, anything from html to java and python, so figuring out the basic is easy), but, what I don't know about is 2 files I see when I unpack a mod, "names.txt" and "*.locale" files.

If I add content (new xml files) do I have to add anything to the names.txt and/or the "*.locale" files?

Here is the basics of what I am doing, the Uber Cargo Mod adds two more levels of Cargo Expansion (Levels 4 and 5), I am trying to add more to this (Up to level 20). The XML part is easy and that I already have. And I even made all the icon png files. What I don't get is do I have to add anything into the names.txt and there is a .locale file called spacegame_tools.locale that has the prop files, some hex value and a description:

example:

Code: Select all

# cargoupgrade3.prop - spaceToolDescription
0xeba16d0d Large Cargo Hold

# cargoupgrade3.prop - spaceToolDetailDescription
0x4cc4dccc Increase your spaceship's cargo capacity.

# cargoupgrade3.prop - spaceToolLockedDescription

# cargoupgrade4.prop - spaceToolDetailDescription
0x4cc4eccc Increase your spaceship's cargo capacity.

# cargoupgrade4.prop - spaceToolLockedDescription

# cargoupgrade5.prop - spaceToolDetailDescription
0x4cc4fccc Increase your spaceship's cargo capacity.

# cargoupgrade5.prop - spaceToolLockedDescription
Now, cargoupgrade3 has a Regular spaceToolDescription which the two new cargo upgrades 4 and 5 don't, I assume the guy who made this mod just didn't add it in. He only did the spaceToolDetailDescription. But I notice that the hex values are all different, I am not sure if this file is generated when the mod was unpacked or if I have to create these values some how? I can just add the lines of my new prop files but what do I do about the hex values? I notice that the hex values of the spaceToolDetailDescription of these only goes up by 4096 bytes each time (1000 hex value) eg. 0x4cc4dccc -> 0x4cc4eccc -> 0x4cc4fccc, so if I was to continue along this path, the next values would be: 0x4cc50ccc -> 0x4cc51ccc -> 0x4cc52ccc -> so and and so fourth.... Am I correct here?

Also, which is odd, this info does not match what he has in his new xml files:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<properties>
  <string16 name="description">Cargo Upgrade</string16>
  <key name="parent" groupid="spacetools~" instanceid="tooltemplate" typeid="prop" />
  <int32 name="spaceToolBuyCost">2000</int32>
  <key name="spaceToolContext" instanceid="#9AB762C0" />
  <texts name="spaceToolDescription">
    <text>Extreme Cargo Hold</text>
  </texts>
  <texts name="spaceToolDetailDescription">
    <text tableid="spacegame_tools" instanceid="#4CC4DCCC">Increase your spaceship's cargo capacity to maximum so you can haul the most of all.</text>
  </texts>
  <key name="spaceToolImageID" groupid="ufotools~" instanceid="cargo4" typeid="png" />
  <texts name="spaceToolLockedDescription">
    <text tableid="spacegame_tools" instanceid="#A0BB7099">Requires ~commodity_requirements~</text>
  </texts>
  <float name="spaceToolMaxRange">1</float>
  <key name="spaceToolType" instanceid="#A8CFDBDA" />
</properties>
Here he is using the intanceid's of cargoupgrade3.prop file (Notice above [<text tableid="spacegame_tools" instanceid="#4CC4DCCC">]) . Not sure that matters, maybe just bad practice?

Well, if anyone can help me out here, I would greatly appreciate it.


rob55rod
Admin
Admin
Posts: 4086
Joined: Sat Jul 02, 2011 9:50 am

Re: Adding Content to Mod (Using SporeMaster)

Unread post by rob55rod »

Don't touch names.txt, that's dealt with automatically.

Honestly if you're planning on adding any localized text strings, I'd recommend adding an entirely new locale file for that, to avoid potential conflict with other mods.

So, for example, in one of your cargo upgrades, you could have this:

Code: Select all

  <texts name="spaceToolDetailDescription">
    <text tableid="spacegame_tools_evenMoarCargo" instanceid="#00000001"></text>
  </texts>
(The tableid determines which locale file in the "locale~" folder to use, and the instanceid determines which string is used within that file.)

Next, you'd want to add a file in the "locale~" folder, named "spacegame_tools_evenMoarCargo.locale", containing this:

Code: Select all

0x00000001 Increase your spaceship's capacity, so you can carry with you a Galaxy of things to do.
Exactly what the instanceid for the string is doesn't really matter, as long as it matches between the PROP file and the locale file, and isn't used more than once in the same locale file.


Does that clarify? ^-^

(Also why are you still using SporeMaster?)

(...also...16 years of programming experience, you say? 'cause if any of those years involve C++, then this may be of interest: https://sporemodder.wordpress.com/spore-modapi/ )
Having trouble with the Spore ModAPI Launcher Kit? Get help here!

If you're reading this, you have my permission to build off of my mods as long as I am credited. Please don't mirror my work unaltered, unless I no longer provide a working download.
User avatar
ajsmith21
Cell
Cell
Posts: 6
Joined: Tue Oct 17, 2017 1:17 am

Re: Adding Content to Mod (Using SporeMaster)

Unread post by ajsmith21 »

Perfect! Now I understand this... Thanks for much for the help!
rob55rod wrote:
(Also why are you still using SporeMaster?)

(...also...16 years of programming experience, you say? 'cause if any of those years involve C++, then this may be of interest: https://sporemodder.wordpress.com/spore-modapi/ )
Is there something better than SporeMaster?

I do have some experience with C++ and I had no idea about the modapi, that is awesome, must work just like Skyrim's SKSE (Skyrim Script Extender) does. I have made a few personal mods for Skyrim.

Although I don't use Visual Studio for my IDE which is shown in the ModAPI. I usually use NetBeans / IntelliJ /Eclipse or Good old Notepad++ or Vim.
I only use SporeMaster to Unpack/Pack the Mods, I use Notepad++ to do any of the editing and Gimp for any Image editing.

I just recently started playing spore. I had heard about it when it came out, but I was just going back looking up some older games I might want to try and spore happened to be one of them. Would have played it sooner if I knew more about it!
rob55rod
Admin
Admin
Posts: 4086
Joined: Sat Jul 02, 2011 9:50 am

Re: Adding Content to Mod (Using SporeMaster)

Unread post by rob55rod »

Glad to be of use.

Yes, SporeModder is definitely superior to SporeMaster in many ways. Its PROP converter is more reliable, and it supports many more of Spore's file formats, such as SPUI interface layouts, EFFDIR effect packages, and PFX effect scripts.

I suppose the ModAPI is kind of like the SKSE, albeit less complete thus far (that will change over time lol)...honestly to finally find someone who already knows C++ in the Spore modding scene is awesome...the modding scene is severely lacking in mod developers in general, so to find someone new who not only already has experience not only modding Spore but also working with C++ is crazy... O-o

I'm here to help out in any way(s) I can. Also, we have a Discord server as of recently, so you can find me there too, if you use Discord :P
Having trouble with the Spore ModAPI Launcher Kit? Get help here!

If you're reading this, you have my permission to build off of my mods as long as I am credited. Please don't mirror my work unaltered, unless I no longer provide a working download.
User avatar
ajsmith21
Cell
Cell
Posts: 6
Joined: Tue Oct 17, 2017 1:17 am

Re: Adding Content to Mod (Using SporeMaster)

Unread post by ajsmith21 »

Are there going to be any example mods put out on how the ModAPI can be used? Something I can take apart and look at. Like the one that added that magic, is that available somewhere? I am not sure what I would even want to do in Spore yet that would use the ModAPI. I would need suggestions as of now. Since I am only on my second playthrough of spore, the first time I did not use any mods, I wanted to just play it at least once without any, I do this with every game, that way I know what it is lacking and either find a mod to fix this or make it. So far with spore I have found everything I needed.

The only thing I wish was available but does not break the game for me is the ability to put together space fleets, and ability to have some sort of hub planets that you had trade ships that would move spices to that hub planet to allow you to pick up all your spice from as long as you setup one of your ships on a route to pick them up from the planets and move them to the hub planet. Like for example, there are planets that have no spice, maybe you could choose to use this as a trading hub, build trade ships that you set to go out and pick up the spice and bring it back, on a trade route. Each ship has so many slots and can only carry a certain amount, for example, 3 slots with a max of 200 in each slot to start. So they can pick up 200 of 3 different spices (or 600 of one, 200 in each slot) and bring them back to the hub. You will be able to upgrade your hub to hold more and more over time with new achievements in the game to allow this, or building certain buildings outside of the colony (like the storage facility). And upgrade your trade ships the same way. So they get more slots and more space. You also have a limit on how many ships you can build based on how many colonies you have with how many citizens.

This is a big idea, and not sure if at the moment this is possible. Not sure if you have played Anno Series or not (1602 or 1404 specifically). But something like that. In that game you build towns on islands, defend them, expand to new islands with ships, trade stuff between islands (building products like wood/iron/stone and food products and goods the people want) to grow an island and get better stuff, you can also trade to other computer players selling stuff you have to much of or allow them to come get it from you and pay you for it.

But using that, maybe each planet is good for not just spice but have certain products it can produce, like wood and certain metals, different fruits or food (So depending on your race and if you are a carnivore / herbivore / omnivore) will depend on what you need. So for a carnivore that planet would have to produce meat produces for your people to live. Herbivore would need fruits to live. And Omnivores would need a balanced diet. So as you expand your people need this stuff to live and they can build stuff with building materials, new buildings and ships. And get upgrades to these fleets and trading ships from your central home plant as you build the buildings needed to get these upgrades and produce the upgrades (like a factory that produces a certain part that gives you this upgrade). You could sell this stuff to other races, or if a planet produces fruit but you need meat, you could setup a trade to a race that has a planet that produces meat and needs fruit or has extra meat it does not need. You just need to keep your stores on each planet up so your people don't starve. If they do you start to lose production, then they start to abandon your city and leave until you civilization on that planet is gone and get destroyed.

This would expand a lot on the base game giving you more sense of a game I want to keep playing as I can expand across the galaxy but I would have to make sure I have the resources to do so and that my people don't starve and have work to keep them busy. My fleets have a certain health and attack just like the main ship, the better the fleet the better that attack and health. And they can fight other computer player fleets in space if they are an enemy.

Also, to manage all this you would not need to zoom in to the solar system or planet level, you just select the solar system and click a planet to manage. Freeing you from actually having to go all the way back to specific planet after you had setup a colony. And even if you needed to you could just click on the solar system then the planet and click a go there button.

I not sure this is even possible at all anyway, but maybe with the ModAPI?
User avatar
ajsmith21
Cell
Cell
Posts: 6
Joined: Tue Oct 17, 2017 1:17 am

Re: Adding Content to Mod (Using SporeMaster)

Unread post by ajsmith21 »

Now that I think of it, a mod that allows me to pick up spice just by going to the solar system would be great, not actually have to go to each planet there, is there one for this? Or is this also something else that would be for the ModAPI?
rob55rod
Admin
Admin
Posts: 4086
Joined: Sat Jul 02, 2011 9:50 am

Re: Adding Content to Mod (Using SporeMaster)

Unread post by rob55rod »

Uhhhhhhhh

*explodes*

...I just linked Emd to this thread, hopefully he'll have some answers by tomorrow. At this point we're beyond my knowledge...I can barely C++ if my life depended on it and Emd's plans aren't entirely known to me, sooo... .-.
Having trouble with the Spore ModAPI Launcher Kit? Get help here!

If you're reading this, you have my permission to build off of my mods as long as I am credited. Please don't mirror my work unaltered, unless I no longer provide a working download.
User avatar
emd
Admin
Admin
Posts: 619
Joined: Sun Dec 09, 2012 6:21 am

Re: Adding Content to Mod (Using SporeMaster)

Unread post by emd »

As of now the ModAPI does not have any support for specific gameplay features (so you cannot interact with the Space Game). That might be added in a future update, but I can't tell for sure.
Spore Modding Tools:
[list]
[*] SporeModder FX
[*] SporeModder Blender Addons
[*] Spore ModAPI SDK[/list]
Post Reply Previous topicNext topic

Return to “Mod Discussion”