New Resource & Building-Output Types Discussion

New Resources & Star System Features; support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6059
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

New Resource & Building-Output Types Discussion

Post by thunderchero » Thu Dec 17, 2009 12:42 am

With all the recent chat on BOP about this, I had an idea I know code at this point would not allow this. :wink:

But what if dilthium systems had a random limit of dilth so source could run out or be collected or even stolen by intel? Say each empire starts with 50 in surplus and 1 per turn from current mine at home system and mine of home system has limit of 100 (total 150 ships). Other free systems say get a random limit so could run out in as little as 50 turns (50 new ships).

edit; it would also be nice if a colony ship was used to colonize a system you get a dilth back in surplus same if a TT was used to create or upgrade starbase or if a ship was scrapped :wink: . But if any ship is destroyed in battle dilth would be lost.

It is just an idea, If game was able to be edited in this way.

thunderchero

User avatar
Martok
Rear-Admiral
Rear-Admiral
Posts: 1134
Joined: Thu May 01, 2008 2:00 am

Post by Martok » Thu Dec 17, 2009 2:48 am

Sorry tc, but to be honest, I don't think that'd be a very good idea. I hate -- HATE -- finite resources in strategy games, as do the majority of strategy gamers I know.

It's one thing if you can only extract a certain amount of resources per turn (or per minute if it's an RTS), but it's another thing entirely to have resources that can actually run out. It may be realistic, but it's not at all fun -- and this is one area where I think gameplay would definitely trump realism.



Personally, it's my longstanding wish that that *all* star systems in BOTF could produce dilithium -- but of varying amounts (i.e., home systems produce 5 dilithium per turn, with other systems producing anywhere from 1 to 8 dilithium per turn, etc.). I know that's almost certainly an impossible dream (at least barring the extremely unlikely possibility of the game's code being released some day), but I still think it would be the best solution if it could ever be pulled off.
Last edited by Martok on Thu Dec 17, 2009 11:03 pm, edited 1 time in total.
"Evil is easy, and has infinite forms." -- Pascal

KrazeeXXL
BORG Trouble Maker
BORG Trouble Maker
Posts: 2263
Joined: Sat Jan 03, 2009 3:00 am
Location: the 36th Chamber

Post by KrazeeXXL » Thu Dec 17, 2009 4:28 pm

thunderchero wrote:But what if dilthium systems had a random limit of dilth so source could run out or be collected or even stolen by intel? Say each empire starts with 50 in surplus and 1 per turn from current mine at home system and mine of home system has limit of 100 (total 150 ships). Other free systems say get a random limit so could run out in as little as 50 turns (50 new ships).

interesting idea. somehow I like it because it brings some more strategy and planning into the game. But perhaps it would be a change too deep in gameplay of a ten year old game.

Could end even worse then cs with range low ;)

but I still like the freighter idea and both of them combined could be used for trading or something in this direction. but I doubt that the implementation is somehow possible. :/

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 723
Joined: Sun Apr 27, 2008 2:00 am

Re:

Post by Spocks-cuddly-tribble » Thu Dec 01, 2011 4:15 pm

thunderchero wrote:Say each empire starts with 50 in surplus and 1 per turn from current mine at home system and mine of home system has limit of 100 (total 150 ships). Other free systems say get a random limit so could run out in as little as 50 turns (50 new ships).
I just re-read this topic and most of this still would be too much work, but we can turn dilithium into a resource like credits i.e. income & total pool with custom dilithium build costs for ships. A bit tricky to adjust all codes and calulations, but not too much work

However, adjusting UI could be a problem e.g. build screen & object database need a display like "Industry Build Cost X" -> "Build Cost - Industry/Dilithium X / Y". The same goes for F1 empire info "+/- X Dilithium" -> "Dilithium: Income/Total X / Y".
Martok wrote:Personally, it's my longstanding wish that that *all* star systems in BOTF could produce dilithium -- but of varying amounts (i.e., home systems produce 5 dilithium per turn, with other systems producing anywhere from 1 to 8 dilithium per turn, etc.). I know that's almost certainly an impossible dream (at least barring the extremely unlikely possibility of the game's code being released some day), but I still think it would be the best solution if it could ever be pulled off.
It might be possible to re-activate the broken dilithium resource level for something like that.
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
xDx
Commander
Commander
Posts: 275
Joined: Sat May 10, 2008 2:00 am
Location: East Coast, USA

Re: Phantom-Dilithium Bug (fix)

Post by xDx » Fri Dec 02, 2011 9:55 am

Might be off topic but pertains to this idea. What if instead we leave dilithium the way it is in game (as dil is only used to power the warp reactor of a newly built ship not much is needed) plus making varying amount of extra dil structures for each empire is possible so no fix needed imho. What if we use the code altercations to make another resource (say like crew or officers produced per system) that would be required to build a starship? It's just a nerd's dream and probably not feasible but since this idea was brought up again is it possible?
"The only thing we have to fear is fear itself." -- FDR

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 723
Joined: Sun Apr 27, 2008 2:00 am

Re: Phantom-Dilithium Bug (fix)

Post by Spocks-cuddly-tribble » Sat Dec 03, 2011 7:48 am

xDx wrote:What if we use the code altercations to make another resource (say like crew or officers produced per system) that would be required to build a starship?
Could be possible, but somehow I doubt it would be of much use, since the ship-pop-support feature already does that better.

But of course, we'll try to find some nice implementations for the broken resource codes. You could open a new topic on the subject. Maybe someone comes up with some good & realistic ideas. :)
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
anjel
Past Administrator
Past Administrator
Posts: 666
Joined: Thu May 08, 2008 2:00 am
Location: Bs As - Argentina

Re: Phantom-Dilithium Bug (fix)

Post by anjel » Sat Dec 03, 2011 1:40 pm

duranium or tritanium source, for building ships ???

User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Re: Phantom-Dilithium Bug (fix)

Post by Peter1981 » Sun Dec 04, 2011 6:36 am

a duranium/tritanium source (maybe from asteroids) could speed up ship construction in a system with a powered up Advanced Foundary -- like the utopia planitia shipyard but maybe a percentage increase?

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 723
Joined: Sun Apr 27, 2008 2:00 am

New Resource & Building-Output Types Discussion

Post by Spocks-cuddly-tribble » Sun Dec 04, 2011 7:32 am

anjel wrote:duranium or tritanium source, for building ships ???
I don't care how you guys name it. But should be technically related to ship production (not ship support) and it will replace dilithium (note the above named interface issues!).

Peter1981 wrote:a duranium/tritanium source (maybe from asteroids) could speed up ship construction in a system with a powered up Advanced Foundary
Since the broken dilithium resource level is technically unrelated to the above global resource it could do something like that i.e. it can be used to create e.g. limited local resources and/or as muliplier for the related building outputs (interface issue!).

Peter1981 wrote:like the utopia planitia shipyard but maybe a percentage increase?
New code will feature a static- & %- ship building bonus (easy swappable between output types via a simple hex-value) and e.g. the ship yards self could use one of them.
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: New Resource & Building-Output Types Discussion

Post by QuasarDonkey » Mon Dec 05, 2011 12:15 am

Please give us things to make us strong :) If you can turn dilithium into a resource, I can fix all the UI code. It's all done through C's sprintf function (string print formatted). It's just a matter of changing a lexicon entry, and pushing an extra value to sprintf. (Some code might need to be rearranged, but not too difficult.)

User avatar
xDx
Commander
Commander
Posts: 275
Joined: Sat May 10, 2008 2:00 am
Location: East Coast, USA

Re: New Resource & Building-Output Types Discussion

Post by xDx » Mon Dec 05, 2011 8:36 am

Sweet gentlemen nice to see people are interested in making something happen with this and all excellent ideas so far :) What I was hoping for was to create a completely new resource (e.g. deuterium, tritanium, etc) AND also have dil the way it is used in game now as requirements to build ships. This resource could have as SCT suggested a static amount and %increase in the edifice files for ship production. I figure with energy screen project finished this would create more strategy as certain needed systems to build structures or varying amounts for ships etc etc. Is this possible? If not, then we could do as Martok and SCT suggested and have certain systems be able to produce more or less dil and create a reserve for it where each starship would require X amount of dil to build...
"The only thing we have to fear is fear itself." -- FDR

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 723
Joined: Sun Apr 27, 2008 2:00 am

Re: New Resource & Building-Output Types Discussion

Post by Spocks-cuddly-tribble » Wed Dec 07, 2011 2:56 pm

Ok, i had a glance at the codes and project is definitely on 'go, albeit too much work for the moment.


Reading the suggestions in this thread we have 3 sub-projects:

1. Fixing the unfinished global resource for ship construction (default dilithium, almost broken)

2. Using the system resource level (unused; default range 1-10 for dilithium only)

3. Activating more non-planet system features for e.g. building requirements (default only dilithium)

Before commenting please note that a.) the term dilithium is swappable to any other resource and b.) the points 1, 2 & 3 are technically different topics!


# 1
I found unused broken code almost doing what we need. When MicroProse ran out of time, they just switched dilithium pool to turn output resp income to ships-under-construction but forgot to change effective code, resulting in the phantom dilithium bug. Probably [shiplist.sst+11A] was meant to be the dilithium price of ships (test default 10 due to resource level default range 1-10 resp for major ships only since for minor/monster ships unneeded by default).

-> Since we're going to use this for unique weapon animations, could we use 1 byte each from the ship class & type -string for the weapon prefix? (we still have no complete shiplist.sst structure description here on AFC - know that really sucks!)

Also there is a broken feature a second time loading the local dilithium output (i.e. building output) for ship building purposes, despite of the fact it's already added to the global pool. I'm not 100% sure what's good for (yet). Need another look at this when more time available.

Looking at the vanilla ship price progression (industry) I'd say it's possible that the 4th value of the starting pop/credits datafield was meant to be the dilithium starting pool, like thunderchero suggested above (with an increased income due to using resource level).

And of course, we could e.g. change intel event 'destroy credits' to 'steal dilithium'. :wink:


# 2
System resource level -> word [systInfo+6E] default 0 resp for dilithium systems 1-10. Major home systems always 5 (due to a bug not always set for space faring minors -> easy to fix)

Default range 1-10 indicates it's a broken extraction multiplier (like Martok said above). Maybe meant for refineries only (by building ID) not prison-mine / singularity-plant?

The value gets set with the dilitium flag (for dilithium icons and building restrictions) but is technically unrelated. Default restriction to dilithium systems should be easy to extend.


# 3
More system features

-Building restrictions:

[edifice.bst+0x71h] = System requirement (1 byte)
0 - Arctic planet
1 - Barren planet
2 - Desert planet
3 - Gas Giant
4 - Jungle planet
5 - Oceanic planet
6 - Terran planet
7 - Volcanic planet
=> vs. [systInfo+70h] = planet types bitmask (resp. anomaly bit -> bug?, see below)
8 - None
9 - Asteroid (not working)
A - Asteroid belt dilithium (not working)
B - Dilithium
C - Worm hole (not working)
D - Radio Pulsar (not working)
E - X-Ray Pulsar (not working)
=> vs. [systInfo+71h] = or 0x8 i.e. 4th bit -> dilithium flag

I just run a test with only bit 3 set at [systInfo+71h], all dilithium sources scrapped & build queue = auto:
-> game freeze at turn 10 (missing dilithium flag vs. AI code or the bugged build queue code)

After that 0xFF i.e. all 8 bits set for up to 7 missing system features:
-> no crash so far, dilithium icon map -> resource level (minor bug), system view (sun animation) -> bitmask

Conclusion: With searching, adapting and testing all codes, this is going to be a 5+ hours time waster i.e. way to much for the moment.


Thus, in the meantime, here is plan 9-b from outer space:

byte[systInfo+31h] = star type (red giant=04, orange=05, yellow=06, white=07, green=08, blue=09)
dword[systInfo+32h] = name of the star picture i.e. s-X- with X being first letter of star color

Say there is e.g. a 5% chance for a star system special feature depending on the star type(i.e. star color). For example for red stars this could be ancient ruins/technologies increasing local research output by e.g. resouce level *2%, for an other star type a rare metal increasing industry output, latinum deposits for local credit output or an asteroid belt increasing dilithium refinery output by the system resource level.

The main point is that the resource icon and/or info text will be part of the sun animations.

-> When system feature present [systInfo+32h] s-X- = e.g. s1X-

s1X-.ani -> sX1b1.gif & sX1b2.gif -> resource icon / info text part of the sun gif files
s1X-map.tga & s1X-maps.tga -> F1 maap icons (unchanged, just renamed copies)


Still unknown in systInfo:

Offset 0x006C to 0x006D = number of ? (cf. 0x00B8)
Offset 0x0072 to 0x0077 -> below the system bitmask for buildings
Offset 0x00B4 to 0x00B7 = address of ???, length 4bytes/planet
Offset 0x00B8 to 0x00BB = address of ???, length 0x40 * unknown at [0x006C]


xDx wrote:I am trying to change what dilithium value is required to finish a star ship on completed turn. Currently vanilla and all currently released mods is +1 dilithium.
First of all, the phantom dilithium topic and my PM box are two entirely different things^^.

As said #1 above, since there is no dilithium pool, just a current turn output, consequently there's no dilithium price. BotF just compares number of ships under construction with the current total dilithium output. Some broken parts of the unfinished feature use simple inc & dec commands (i.e. +/-1) in a count loop. Translation: Your request is part of project #1.
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

Post Reply

Return to “New Resources & Star System Features”

Who is online

Users browsing this forum: No registered users