Adding Resources?
I want my 15 rapid-fire quantum torpedo launchers Uber-Defiant now! - Get help from modders. Share your work. Discuss modifications.
1, 2
posted on October 10th, 2011, 2:45 am
So a couple friends and I have started work on a mod that would add resources to the game, with base resources in and around your starting base, and higher level resources required for higher-level ships and stations further away from the base, to draw people out into lower-tier engagements while working up to higher-tier equipment, and we were wondering if it is possible to add in more than just the stock Armada resources into FleetOps.
We're guessing that this isn't something that can be done without modifying the core game code, but just to check and make sure, is it possible to add new resource types on top of the stock resource types without modifying the core game code?
And assuming the answer is no, what would it take to add new resource types into the core game code?
We're guessing that this isn't something that can be done without modifying the core game code, but just to check and make sure, is it possible to add new resource types on top of the stock resource types without modifying the core game code?
And assuming the answer is no, what would it take to add new resource types into the core game code?
posted on October 10th, 2011, 3:14 am
Well, there's 2 parts to this issue. I don't actually know much about the structure, but here's how I understand it:
1. it is difficult or even impossible to add resources to the game engine.
2. that being said, Fleet Ops uses fewer resources than the original Armada II. I think there are at least 2 resources that are unused currently, that could be added back in for your purposes.
-----Warning: I could be completely wrong about this-----
1. it is difficult or even impossible to add resources to the game engine.
2. that being said, Fleet Ops uses fewer resources than the original Armada II. I think there are at least 2 resources that are unused currently, that could be added back in for your purposes.
-----Warning: I could be completely wrong about this-----
posted on October 10th, 2011, 3:48 am
Yeah, we're already familiar with the stock game resources, but that's not enough for our purposes. Ideally, we're looking to have 14+ resource types, just for the Federation (though most wouldn't be race-exclusive). We could probably finagle something along the lines of what we want without having additional resources, but we would ideally like to be able to just add additional, full-blown resources.
posted on October 10th, 2011, 4:05 am
Last edited by Dominus_Noctis on October 10th, 2011, 4:11 am, edited 1 time in total.
I assume that by 'resource types' you want resources that can be mined, display on resource objects, show up on the global resources GUI etc. This indeed cannot be done without coding.
What is possible is that you can make items required for building certain things and thus 'fake' the resources. I.E. say that your Sovereign requires Emeralds, Rubbies, and Tritanium, Dilithium, and Crew. You can get Tritanium, Dilithium, and Crew via good old mining/baby making, but Emeralds and Rubbies can only be acquired by capturing an old mining station (i.e. beam over and capture the station, fulfilling the requirements).
In regard to adding new resource types you'd have to become proficient in learning to write hooks, read the executable (assembly) etc. If you actually have a good deal of background behind this, I'm sure that Doca would be interested. If this seems mystical, it's always possible to start learning a language - Lua is used by Megadroid to get into A2, and this offers a separate way to code things. No matter what you choose, it will not be easy, and it will likely take many years to get the project underway.
Technically Tryptic is correct: crew and officers are not used actively or (in the latter case) at all as resources. Dilithium, latininum, metal, biomatter are used.
EDIT: oh, yeah, and where are my manners
Welcome to the forums 
What is possible is that you can make items required for building certain things and thus 'fake' the resources. I.E. say that your Sovereign requires Emeralds, Rubbies, and Tritanium, Dilithium, and Crew. You can get Tritanium, Dilithium, and Crew via good old mining/baby making, but Emeralds and Rubbies can only be acquired by capturing an old mining station (i.e. beam over and capture the station, fulfilling the requirements).
In regard to adding new resource types you'd have to become proficient in learning to write hooks, read the executable (assembly) etc. If you actually have a good deal of background behind this, I'm sure that Doca would be interested. If this seems mystical, it's always possible to start learning a language - Lua is used by Megadroid to get into A2, and this offers a separate way to code things. No matter what you choose, it will not be easy, and it will likely take many years to get the project underway.
Technically Tryptic is correct: crew and officers are not used actively or (in the latter case) at all as resources. Dilithium, latininum, metal, biomatter are used.

EDIT: oh, yeah, and where are my manners


posted on October 10th, 2011, 4:09 am
Well, the stock A2 only used about 6 different resource types, so not much luck there. In order for this to work you'd either have to GREATLY trim down your resource types, or do some pretty extensive modding that I'm to tired to think about at the moment. I do like your mod ideas though, sounds pretty cool 

posted on October 10th, 2011, 4:22 am
Here's an idea:
One thing we've wondered about in the past were High-density moons, moons that produced resources faster than normal. You could use an extreme version of this for your mod:
Have one or more resources work in tiers: ie a level 1 ship costs around 10, a level 2 ship costs around 100, a level 3 ship costs 1000, etc. This way the player needs to access a higher-tier moon as well higher-tier miners and refineries to store more resources and unload them faster. Have the second (or third, or fourth) resource use a normal progression, to make it so a tier-2 mining operation can't produce infinite numbers of tier-1 ships. You could say that larger ships require way more tritanium for the hull, but every ship needs a certain amount of Dilithium fuel.
The problem with using discrete resource types for each tier is that when a player gets the higher-tier resources, he is forced to keep building lower-tier ships alongside his higher-tier ships if he wants to stay competitive.
One thing we've wondered about in the past were High-density moons, moons that produced resources faster than normal. You could use an extreme version of this for your mod:
Have one or more resources work in tiers: ie a level 1 ship costs around 10, a level 2 ship costs around 100, a level 3 ship costs 1000, etc. This way the player needs to access a higher-tier moon as well higher-tier miners and refineries to store more resources and unload them faster. Have the second (or third, or fourth) resource use a normal progression, to make it so a tier-2 mining operation can't produce infinite numbers of tier-1 ships. You could say that larger ships require way more tritanium for the hull, but every ship needs a certain amount of Dilithium fuel.
The problem with using discrete resource types for each tier is that when a player gets the higher-tier resources, he is forced to keep building lower-tier ships alongside his higher-tier ships if he wants to stay competitive.
posted on October 10th, 2011, 9:14 am
Dominus_Noctis wrote:If this seems mystical, it's always possible to start learning a language - Lua is used by Megadroid to get into A2, and this offers a separate way to code things.
To nitpick, I don't use Lua to get in - all the getting in is done in C++ but I expose stuff to Lua so its a bit more friendly.
posted on October 10th, 2011, 11:50 am
Quick question for the developers. How long would it take to make an API for adding resources?
posted on October 10th, 2011, 12:19 pm
I dont think its doable at the moment, as resources are used by a vast selection of modules in A2 (weapons, units, gui, ...) and a few of them are still untouched. Plus, it would break compatibility
posted on October 10th, 2011, 12:44 pm
it may be possible to add more resource types code-wise, but would take too much time to implement. essentially everything related to resources is hardcoded in armada 2.
posted on October 10th, 2011, 1:02 pm
I believe it would be possible for FO to use a CustomResourceIndex to allow users to use mods that define (on a per mod basis) what the resource name is. But the mod would have a "Resource.dll" to actually define the resources for the mod. The base FO would interpret this to resource indexes for maps and GUI, but the actual names for ODF commands.
posted on October 10th, 2011, 3:05 pm
would it not be possible to re-implament planets as for resource reasons(AKA metal) as various planet classes in stock allowed you to mine metal at a faster/slower rate. or add larger dill/trit moons that require an orbital mining facility. this would even add a new dimension to the resource structure for fleetops if done correctlly.
posted on October 10th, 2011, 3:13 pm
A2_Tiger wrote:would it not be possible to re-implament planets as for resource reasons(AKA metal) as various planet classes in stock allowed you to mine metal at a faster/slower rate. or add larger dill/trit moons that require an orbital mining facility. this would even add a new dimension to the resource structure for fleetops if done correctlly.
That gives me an idea.
posted on October 10th, 2011, 3:26 pm
Any resource object can release resources at a different rate 

posted on October 10th, 2011, 9:14 pm
Dominus_Noctis wrote:I assume that by 'resource types' you want resources that can be mined, display on resource objects, show up on the global resources GUI etc. This indeed cannot be done without coding.
Yeah, that's what we had figured, and also that it would be something beyond the realm of a practical/feasible addition, for the time being, anyway.
Dominus_Noctis wrote:What is possible is that you can make items required for building certain things and thus 'fake' the resources. I.E. say that your Sovereign requires Emeralds, Rubbies, and Tritanium, Dilithium, and Crew. You can get Tritanium, Dilithium, and Crew via good old mining/baby making, but Emeralds and Rubbies can only be acquired by capturing an old mining station (i.e. beam over and capture the station, fulfilling the requirements).
THAT could be an interesting work-around. It wouldn't quite give us what we want, but I spent some time thinking about it at work today, and as an almost-the-same-thing work-around, I think it will give us just about everything we were looking for, especially if we set the tech tree for bigger/more significant ship stations to require multiple captured 'mining' stations. Thanks for the idea!
Dominus_Noctis wrote:In regard to adding new resource types you'd have to become proficient in learning to write hooks, read the executable (assembly) etc. If you actually have a good deal of background behind this, I'm sure that Doca would be interested. If this seems mystical, it's always possible to start learning a language - Lua is used by Megadroid to get into A2, and this offers a separate way to code things. No matter what you choose, it will not be easy, and it will likely take many years to get the project underway.
Technically Tryptic is correct: crew and officers are not used actively or (in the latter case) at all as resources. Dilithium, latininum, metal, biomatter are used.
EDIT: oh, yeah, and where are my mannersWelcome to the forums
Yeah, I figured it would be a complex process. Probably beyond my skill level, but not that far beyond (I was half-way to a BS in game software dev before switching to physics and philosophy } : = 8 ) ). Something to look into later, then. The capturable station idea you provided should do just about everything we want to do, more or less, and if we do find a way to get additional resources added in, or knuckle down and pound through the hard-coding, it should be simple enough to replace those with resource nodes.
Thanks! I've been around for a while, just never had a need to start posting before. } : = 8 )
1, 2
Reply
Who is online
Users browsing this forum: No registered users and 1 guest