Modules

Freeform discussion about anything related to modding Transcendence.
User avatar
Fatboy
Militia Lieutenant
Militia Lieutenant
Posts: 247
Joined: Fri Feb 22, 2008 1:52 am
Location: California

Can you make Modules for your extension
example:

Code: Select all

<!-- Modules -->

	

<Modules>

	<Module filename="Antarctica.xml"/>

	<Module filename="AresOrthodoxy.xml"/>

	<Module filename="BattleArena.xml"/>

	<Module filename="BlackMarket.xml"/>

	<Module filename="CentauriWarlords.xml"/>

	<Module filename="CharonFortress.xml"/>

	<Module filename="CharonPirates.xml"/>

	<Module filename="Commonwealth.xml"/>

	<Module filename="CommonwealthAgricultural.xml"/>

	<Module filename="CommonwealthFleet.xml"/>

	<Module filename="CommonwealthMetropolis.xml"/>

	<Module filename="CommonwealthMilitia.xml"/>

	<Module filename="CommonwealthMining.xml"/>

	<Module filename="CorporateContractsStub.xml"/>

	<Module filename="CorporateHierarchy.xml"/>

	<Module filename="Domina.xml"/>

	<Module filename="DwargRaiders.xml"/>

	<Module filename="EncountersVol01.xml"/>

	<Module filename="Eridani.xml"/>

	<Module filename="Heretic.xml"/>

	<Module filename="Huari.xml"/>

	<Module filename="KorolovShipping.xml"/>

	<Module filename="Luminous.xml"/>

	<Module filename="Mining.xml"/>

	<Module filename="MiscItems.xml"/>

	<Module filename="OutlawMiners.xml"/>

	<Module filename="PlayerShip.xml"/>

	<Module filename="PointJuno.xml"/>

	<Module filename="Rasiermesser.xml"/>

	<Module filename="Ringers.xml"/>

	<Module filename="RogueFleet.xml"/>

	<Module filename="SistersOfDomina.xml"/>

	<Module filename="StdArmor.xml"/>

	<Module filename="StdExplosions.xml"/>

	<Module filename="StdShields.xml"/>

	<Module filename="StdWeapons.xml"/>

	<Module filename="SungSlavers.xml"/>

	<Module filename="Teratons.xml"/>

	<Module filename="Tinkers.xml"/>

	<Module filename="UrakWarlords.xml"/>

	<Module filename="UsefulItems.xml"/>

	<Module filename="Worlds.xml"/>

</Modules>


from the Transcendence.xml file
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

yes, but you have to replace transcendence.xml and not everybody unpack the game with transdata.
However tocal conversions could take advantage of this flexibility.


idea:
What about custom modules that are simply loaded when put in root folder of transcendence ?
This will resolve the problem of declaring multiple times a custom UNID trough all the extensions that are using it.
schilcote
Militia Captain
Militia Captain
Posts: 726
Joined: Sat Feb 02, 2008 7:22 pm

I think what he's asking is if he can have modules in an extension in the extensions folder. Like this:

BagelModMain.xml

Code: Select all

....
...
...

<Modules>
BagelModWeapons
BagelModShields
BagelModFunctions
</Modules>

[schilcote] It doesn't have to be good, it just has to not be "wow is that the only thing you could think of" bad
User avatar
Fatboy
Militia Lieutenant
Militia Lieutenant
Posts: 247
Joined: Fri Feb 22, 2008 1:52 am
Location: California

yes, schilcote, that's what I want.
It seems like I have tried it before and the game had an error parsing the XML file.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

AFAIK
<Modules> definitions are not supported in extensions.
User avatar
Fatboy
Militia Lieutenant
Militia Lieutenant
Posts: 247
Joined: Fri Feb 22, 2008 1:52 am
Location: California

Maybe we could PLEAD to George to add them in 1.0. :)
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Fatboy wrote:Maybe we could PLEAD to George to add them in 1.0. :)
That would be VERY awesome.

The problem is that anything ending in .xml will be attempted loaded, so your modules would have to be excluded somehow. I can see the code for that become pretty nasty.

How about we really nail down the format for extensions. Say:
* An extension is a file ending in .xml
* Each extension can bring along a directory that is named as the file, but without the fileending (possibly tack on Resources or something, to prevent the linux 'folder named like file' bug).
* Transcendence will not search extension folders when looking for new extensions.

This would leave us free to add modules in the extension subfolder, and encourage extension separation (no more unpacking a mod that throws 10 files into your extension folder >.<).

Personally, this would make me happy.

In addition it could also be part of the solution for the load order problems. We would be able to build modules that shared functionality, and have other mods load them as dependencies (at the top of their xml is uppose)

That would make me really happy.

.]
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

extensions can already be in their own directory for 1.0 ^^
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Wolfy wrote:extensions can already be in their own directory for 1.0 ^^
would you explain that a bit?
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

alterecco wrote:
Wolfy wrote:extensions can already be in their own directory for 1.0 ^^
would you explain that a bit?
You can do this:
.../trans1/extensions/cakemod/cakemod.xml
.../trans1/extensions/cakemod/stillalive/stillalive.xml
etc.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Wolfy wrote:You can do this:
.../trans1/extensions/cakemod/cakemod.xml
.../trans1/extensions/cakemod/stillalive/stillalive.xml
etc.
Ok, I realize that. What i mean was to have a folder that would not be scanned for extensions, but still accessible from an extension. This would probably make the use of modules in extensions easier (from a coding point of view)

.]
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

alterecco wrote:
Wolfy wrote:You can do this:
.../trans1/extensions/cakemod/cakemod.xml
.../trans1/extensions/cakemod/stillalive/stillalive.xml
etc.
Ok, I realize that. What i mean was to have a folder that would not be scanned for extensions, but still accessible from an extension. This would probably make the use of modules in extensions easier (from a coding point of view)

.]
Dunno about preventing folders from getting read...
Taben and I were poking George to let us prefix the folder with "_" to deactivate it. No news as of yet...

BTW schilcote, Cake>bagels

and the cake wasn't a lie!
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
schilcote
Militia Captain
Militia Captain
Posts: 726
Joined: Sat Feb 02, 2008 7:22 pm

I propose a very simple solution to this problem, one that allowed me to keep broken mods in my Extensions folder untill recently.

It used to be that if a Transcendence extension did not have the <TranscendenceExtension> thing at the top, Transcendence ignored it. Now it raises an error, but if we just put <TranscendenceModule> or just nothing at the top, that would solve that problem.

Also, if you think about it, is this really necessary? I mean, all the Modules thing does is make sure XMLs are loaded, and if they're in the extensions folder, they're loaded anyway.
[schilcote] It doesn't have to be good, it just has to not be "wow is that the only thing you could think of" bad
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

schilcote wrote:Also, if you think about it, is this really necessary? I mean, all the Modules thing does is make sure XMLs are loaded, and if they're in the extensions folder, they're loaded anyway.
The reason for wanting control over the load order is very good actually. Say I make a mod that defines a function that is used at load time to manipulate some data, for example a list of dockscreens. Now, if it is only me using that function, everything is fine, but if i want to make a mod other people can interface with from their mods, then they need to somehow be able to use this function. As it stands now, this is not possible, because you would never know if the mod that defines the function has been loaded when your code executes. This means that to provide the functionality of for example the dockscreen hook, one has to come up with some nasty hacks. Being able to specify a dependency directly would solve this nicely.

.]
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

I have an idea for resolving the UNID redeclaration in every extension.

A new <GlobalUNIDTable> (or whatever fancy name you want) definition for extensions, when you declare the UNIDs in there, they behave as they were declared in transcendence.xml, and so making them universal for all the mods.

This would also resolve the necessity of modules.
Post Reply