disassembler help/energy screen project

Energy Screen with 15+ Building Buttons + patchtool; support/discussion/questions

Moderator: thunderchero

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

Re: disassembler help/energy screen project

Post by Peter1981 »

TC wrote:
first one that comes to mind would be the redeployment screen to allow more than 9 in a fleet.
I'd hope to be able to have more than nine planets in a star system; or binary and trinary starsystems; or wormholes in star systems;

anyway with or with out the crash upon exit this is still a huge leap forward QD in nailing down one of the bigest challenges in modding :)
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: disassembler help/energy screen project

Post by QuasarDonkey »

thunderchero wrote:first one that comes to mind would be the redeployment screen to allow more than 9 in a fleet.
The limiting factor there is in the TaskForce data structure, which is limited to nine ships. So it would take a lot more work than just modifying the UI. It would be theoretically possible, by enlarging the data structure and changing all the references in a similar way to what I've done here. However, it's a bit more complicated because of the presence of TaskForces in stack variables. I was recently analysing the Ship/TaskForce code, and a lot of functions have local Ships/TaskForces on their stacks. Although I think they're only used for computing a key to search the ship/taskforce heaps/hashtables (therefore the entire structure is not used, just the fleetId, so we might get away with enlarging the structure, ignoring all the stack variables). I'll look into this if I have more time, but it would be a rather ambitious project :D
Peter1981 wrote:I'd hope to be able to have more than nine planets in a star system; or binary and trinary starsystems; or wormholes in star systems;
Yeah those would be cool, like having a wormhole over Bajor. Having binary/trinary stars is out for technical reasons (game mechanics dictates each sector can only have one star system). It may be possible to have an anomaly and a star in one sector.
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: disassembler help/energy screen project

Post by QuasarDonkey »

You'll be pleased to know that I've fixed the crash problem. I had missed a few code references to the special/defense pics in my first analysis. I've also fixed my patchtool to mod the WDF files too.

But now there's a new problem with phantom text boxes :x i.e. if you're at a system with more than 14 energy structures, and switch to another system with < 14, the text boxes showing the energy requirements will still be visible from the last system. Once I get this fixed, we really will be in business.
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: disassembler help/energy screen project

Post by QuasarDonkey »

IT'S ALIVE! :twisted:

And fully functional. I need to do a little more testing to make sure I didn't confuse any special/defense variables. And I just need to clean up the patch tool, and fix it up to generate optimal grid-layout WDFs. I reckon we could squeeze 30+ energy structures with a fairly compact layout (10 special structs, 20 defense).

I'll try have it posted within the hour.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7824
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: disassembler help/energy screen project

Post by thunderchero »

sounds great,

you might want to go ahead a start a new post in "Solutions; Bug fixes and recoding of game" with all the details and links

also would my wdf files I created be able to be used? 14 of each type.

also does it still act as before? if too many defense structures extras move to special?

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

Re: disassembler help/energy screen project

Post by QuasarDonkey »

thunderchero wrote:you might want to go ahead a start a new post in "Solutions; Bug fixes and recoding of game" with all the details and links
Will do. I'm still doing some testing now.
thunderchero wrote:also would my wdf files I created be able to be used? 14 of each type.
No, in order for the patch to work, some of the object id's inside the WDF's needed to be changed. But the patchtool will mod the WDF's for you. For now it lays out the structures in a single row each. If the layout doesn't suit, you can edit the WDF's. I might update the tool to support a grid layout.
thunderchero wrote:also does it still act as before? if too many defense structures extras move to special?
Yes, it behaves exactly as before, except it supports more structures.

Due to certain patches using bytes to hold numbers (specifically 4*NumSpecial and 4*NumDefense in a single byte each), I believe the limit is 256/4 = 64 structures of each type (we'll have to test this though). Even 30 structures overall should be enough.
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Re: disassembler help/energy screen project

Post by Peter1981 »

I agree QD 30 structure is a quantum leap from just seven ;)
looking forward to seeing this. :D
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: disassembler help/energy screen project

Post by QuasarDonkey »

I've posted the patchtool in the Solutions/recoding section:
viewtopic.php?f=9&t=2217&p=30694&sid=20 ... 434#p30694
I'll post the technical details later.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: disassembler help/energy screen project

Post by Tethys »

QuasarDonkey wrote:
thunderchero wrote:first one that comes to mind would be the redeployment screen to allow more than 9 in a fleet.
The limiting factor there is in the TaskForce data structure, which is limited to nine ships. So it would take a lot more work than just modifying the UI. It would be theoretically possible, by enlarging the data structure and changing all the references in a similar way to what I've done here. However, it's a bit more complicated because of the presence of TaskForces in stack variables. I was recently analysing the Ship/TaskForce code, and a lot of functions have local Ships/TaskForces on their stacks. Although I think they're only used for computing a key to search the ship/taskforce heaps/hashtables (therefore the entire structure is not used, just the fleetId, so we might get away with enlarging the structure, ignoring all the stack variables). I'll look into this if I have more time, but it would be a rather ambitious project :D
Peter1981 wrote:I'd hope to be able to have more than nine planets in a star system; or binary and trinary starsystems; or wormholes in star systems;
Yeah those would be cool, like having a wormhole over Bajor. Having binary/trinary stars is out for technical reasons (game mechanics dictates each sector can only have one star system). It may be possible to have an anomaly and a star in one sector.
Regarding the first quote:
What if we can group the taskforces together, into maybe something called Fleets. 9 ships per taskforce, 9 taskforces per fleet. Could it be done, or would it still be affected by taskforce data? We're not talking about extending the Taskforce to accommodate more ships, but rather creating an additional hierarchy (if that makes sense)

Regarding second:
All we need is the ability to add 'new' habitable star types (f.e. Blue, Yellow, Red, Green, Orange [vanilla], in addition - BDwarf, RDwarf, WDwarf), not merge 2 star systems into 1 sector (as I believe thats how I interpreted your understanding of Peter's quote). A simple tga showing 2 or 3 or 5 stars could be used in place of the dwarf stars, considering if we could add more habitable star types to the game. Also if Bajor gets a wormhole it must force an endpoint (must always have one). Another idea would be to have unstable wormholes with their endpoints as special anomalies which you cannot travel back thru, only able to send transports to build their way back. ;)
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Re: disassembler help/energy screen project

Post by Peter1981 »

regarding wormholds (off topic - sorry):

yes i agree tethys; wormholes should come in at leaset four varieties

1. stable (start & endpoints fixed)
2. Barzanesque (start fixed, endpoint random)
3. unstable (start maybe type 2. or 4., endpoint random or ship lost.)
4. Deathtrap (start is ship lost, endpoint none)
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3179
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: disassembler help/energy screen project

Post by Flocke »

@tethys, nice ideas but both are impractible.
For the fleet size, better just find a way to increase the limit cause else there'll be too much code to adjust.
For the planets, if you merge them, you can't terraform them by single and they don't have individual bonuses, so it would be useless.

In both cases there'll be found a solution sooner or later, I believe so. :)

@wormholes, I'm still missing the option to analyse a wormhole without loosing a ship. ^^
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: disassembler help/energy screen project

Post by QuasarDonkey »

Flocke wrote:For the planets, if you merge them, you can't terraform them by single and they don't have individual bonuses, so it would be useless.
:?: Reread Tethys' post, he's right. If we could increase the number of star types, replacing the graphics with a picture of a binary system would give the illusion of binary stars (in one system).
Flocke wrote:For the fleet size, better just find a way to increase the limit cause else there'll be too much code to adjust.
Agreed. I will take a look at enlarging the taskforce size though. It may be possible, but will take a bit more work than the energy screen project. Luckily, I've done much analysis of the task force code already.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3179
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: disassembler help/energy screen project

Post by Flocke »

QuasarDonkey wrote:
Flocke wrote:For the planets, if you merge them, you can't terraform them by single and they don't have individual bonuses, so it would be useless.
:?: Reread Tethys' post, he's right. If we could increase the number of star types, replacing the graphics with a picture of a binary system would give the illusion of binary stars (in one system).
Ah, was about binary / trinary star systems, than agreed, simple way is just to replace the graphics and handle as a single planet. :)
QuasarDonkey wrote:
Flocke wrote:For the fleet size, better just find a way to increase the limit cause else there'll be too much code to adjust.
Agreed. I will take a look at enlarging the taskforce size though. It may be possible, but will take a bit more work than the energy screen project. Luckily, I've done much analysis of the task force code already.
That's what I meant, enlarge task force size instead of grouping taskforces another time. Else it's unhandy and also requires new gui and alot code changes.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: disassembler help/energy screen project

Post by Tethys »

Flocke wrote:
QuasarDonkey wrote:
Flocke wrote:For the fleet size, better just find a way to increase the limit cause else there'll be too much code to adjust.
Agreed. I will take a look at enlarging the taskforce size though. It may be possible, but will take a bit more work than the energy screen project. Luckily, I've done much analysis of the task force code already.
That's what I meant, enlarge task force size instead of grouping taskforces another time. Else it's unhandy and also requires new gui and alot code changes.
Much of the gui is already existing, all that is needed for that is some renaming and slight alteration of the wdf and respective locations (of which I am uncertain) in trek.exe, and of course to accommodate the new widget set on main screen, but you all know better than me so I feel we are in good hands :)
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Re: disassembler help/energy screen project

Post by Peter1981 »

just an off the cuff thought but wouldn't larger task forces need some consideration of the auto-battle at least and maybe the battle calculations as well? or does trek.exe not care about the individual ships in a task force but its combined overall stats
Post Reply

Return to “Energy Screen with 15+ Building Buttons + patchtool”