Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Topic started by: Sriseru on July 09, 2013, 02:04:29 PM

Title: Adding Facilities, Secret Projects, and Interludes?
Post by: Sriseru on July 09, 2013, 02:04:29 PM
Hello everyone! :D
I'm working on a mod and would like to add some stuff. I've looked through this section of the forum and have learned, among other things, that you can apparently only add 3 techs before you reach the limit (which I heard was 89).
Besides techs, I would also like to add new facilities, secret projects, and some new interludes. Is it possible to add these, and if so how would one go about doing so?

Oh, I noticed the discussion on this thread (http://alphacentauri2.info/index.php?topic=938.0) regarding the creation of .wve video files, and was just wondering if anyone has had any luck in finding a way to encode videos into that format?
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: sisko on July 09, 2013, 02:24:45 PM
hello Sriseru and welcome to AC2!
i'm sure our regulars will have some answers for your questions.
in the mean time can you tell us how did you find us and maybe some words about your mod (only if it is not a secret)? :D
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Sriseru on July 09, 2013, 04:06:53 PM
Thanks for the warm welcome, sisko! :)

I was searching around for a way to create .wve files when I came upon this forum. I found that there's a lot of good information here about modding SMAC/X, so I decided to ask around for help.

As for my mod, it's based on My Little Pony: Friendship is Magic. Now I know that this might raise a few eyebrows, but MLP:FiM is a surprisingly good show with a well-crafted and deep world.
I know it sound weird when you're not a fan of MLP:FiM. ^.^;;
I'll talk about the mod in a little more detail in the future once I've gotten further. In the meantime, have some screenshots:

(http://fc00.deviantart.net/fs71/i/2013/177/4/d/alpha_equulei___title_screen_by_sriseru-d6apobj.png)

(http://fc00.deviantart.net/fs71/f/2013/190/a/2/alpha_equulei___screenshot_1_by_sriseru-d6cohjq.png)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Buster's Uncle on July 09, 2013, 04:40:23 PM
Nice citizen icons.  ;b;
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Sriseru on July 09, 2013, 04:50:53 PM
Thanks, BUncle. :D
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Geo on July 09, 2013, 04:51:36 PM
My, the Unity veers further off-course every other mod! 186 light years!?  :o ;)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Yitzi on July 09, 2013, 06:40:01 PM
Hello everyone! :D
I'm working on a mod and would like to add some stuff. I've looked through this section of the forum and have learned, among other things, that you can apparently only add 3 techs before you reach the limit (which I heard was 89).
Besides techs, I would also like to add new facilities, secret projects, and some new interludes. Is it possible to add these, and if so how would one go about doing so?

One of the limitations of assembly-language modding (which is what has to be done without the source code) is that you can't really add things most of the time.  So adding techs, facilities, or projects is pretty much out of the question.  There is, however, a loophole: You can't add things, but you can change what they do, and there are all those blank facilities and projects just sitting there.  (i.e. the blank facilities and projects can be repurposed into whichever facilities/projects you want.) 

For techs, though, I don't really see any solution, though; there are just too many places which are based on the given number of techs.  It'd be easier than allowing 14 factions, but probably not by much.  You might want to just figure out a way to streamline your tech tree to bring it down to 88 techs plus transcendent thought (which doesn't behave like a normal tech).

Interludes would be easier to add actually new ones; because of how interludes are stored, I think it could be done, though you'd have to describe what trigger you want.

(Also, for facilities, projects, or interludes, you'd need to find a coder to put it in; I still have more projects of my own that I want to finish before accepting those sorts of requests, but when I'm ready I would probably be able to do it.)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Sriseru on July 09, 2013, 08:19:21 PM
Quote from: Yitzi
One of the limitations of assembly-language modding (which is what has to be done without the source code) is that you can't really add things most of the time.  So adding techs, facilities, or projects is pretty much out of the question.  There is, however, a loophole: You can't add things, but you can change what they do, and there are all those blank facilities and projects just sitting there.  (i.e. the blank facilities and projects can be repurposed into whichever facilities/projects you want.)

I've had a look through the alphax file and I noticed those blank facilities and projects. I also noted three disabled techs which I assume I can replace.
I guess what I'm wondering is: if I replace a blank facility/project, how do I define what it does (for instance, increasing nutrient output)?

Quote from: Yitzi
For techs, though, I don't really see any solution, though; there are just too many places which are based on the given number of techs.  It'd be easier than allowing 14 factions, but probably not by much.  You might want to just figure out a way to streamline your tech tree to bring it down to 88 techs plus transcendent thought (which doesn't behave like a normal tech).

Hm, I figured as much. If I can replace those three disabled techs, that would at least give me three free "slots". I'm also thinking of replacing the resonance and progenitor techs. Hey, if I replace Progenitor Psych, would that screw anything up, considering that Progenitor Psych enables communication between alien and human factions?

Quote from: Yitzi
Interludes would be easier to add actually new ones; because of how interludes are stored, I think it could be done, though you'd have to describe what trigger you want.

Alright.
The first additional interlude would be triggered by the first declaration of Vendetta.
The second would be triggered by the first base lost to an enemy faction.
The third would be triggered by the first time a non-player faction becomes Planetary Governor.
The fourth would be triggered by the first time the player faction becomes Planetary Governor.
The fifth would be triggered by the first Planet Buster used.
Do you think it's possible to implement these?

Quote from: Yitzi
(Also, for facilities, projects, or interludes, you'd need to find a coder to put it in; I still have more projects of my own that I want to finish before accepting those sorts of requests, but when I'm ready I would probably be able to do it.)

I would really, really appreciate any help you would be willing to lend me. =)
Though, to be honest, I'm really curious as to how one would go about altering the code of SMAC/X. :3
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: JarlWolf on July 09, 2013, 08:30:07 PM
A modification based on horse people? Well I guess we've seen weirder with Kilkakon's Lost Eden mod. (note: weird does not=bad. Just unique and batty.) Seems like you have a direction with it; I realize you asked help with the coding, but if you want a graphic artist' help I can lend a hand, I spied some vanilla bases. Though I am unfamiliar with this pony thing. Seen people kind of parade it around and someone once linked me to it, but I never really caught into it, wasn't my thing.

Regardless, let me know if you wish for help.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Buster's Uncle on July 09, 2013, 09:10:43 PM
One of the most frustrating things about modding interludes is that you can't change the triggers, alas.  (That would take .exe coding, which seems to be possible, but I've never seen it done; pretty much the top of my modding wish list is user-programmable interlude triggers.)






P.S. Tara Strong has a nice bodonkadonk.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Sriseru on July 09, 2013, 09:13:46 PM
Quote from: JarlWolf
A modification based on horse people? Well I guess we've seen weirder with Kilkakon's Lost Eden mod. (note: weird does not=bad. Just unique and batty.) Seems like you have a direction with it; I realize you asked help with the coding, but if you want a graphic artist' help I can lend a hand, I spied some vanilla bases. Though I am unfamiliar with this pony thing. Seen people kind of parade it around and someone once linked me to it, but I never really caught into it, wasn't my thing.

Regardless, let me know if you wish for help.

I'm glad you guys are this open-minded about this. ^.^
About the graphics: the bases are pretty much the only thing I haven't replaced yet. I'm going to attempt creating replacements eventually, but if I fail I might ask for your help.
Thanks for offering to help, by the way. =)

Quote from: BUncle
One of the most frustrating things about modding interludes is that you can't change the triggers, alas.  (That would take .exe coding, which seems to be possible, but I've never seen it done; pretty much the top of my modding wish list is user-programmable interlude triggers.)

Yeah, I figured that it would probably involve that sort of thing. :/
Though, thankfully the additional interludes aren't vital to the mod, it was just something that would be nice to have.

Quote from: BUncle
P.S. Tara Strong has a nice bodonkadonk.

Lol, I suppose she has.  ::)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Buster's Uncle on July 09, 2013, 09:23:47 PM
Oh, we're not all that open-minded, and I apologize in advance for how much I'm going to make fun of you right to your face once I've gotten to know you - but there's something cool about doing something different, and it takes all kinds.  Greater diversity is greater richness for the community, and all that.

What do you do your graphics with, program-wise?
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Sriseru on July 09, 2013, 09:36:51 PM
Lol, well I guess there's a lot to make fun of, if your able to find out the right things about me. :3

As for what I use, I primarily use Photoshop CS5.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Buster's Uncle on July 09, 2013, 09:50:31 PM
Okay; a big advantage of Photoshop is that it does a lot of the palette-handling stuff for you.  It'll save you having to fool with some of the work-arounds that GIMP ends up requiring. 

You can find a lot of instructional material in the Graphics thread in this folder, and that's a good place for questions, or click on Articles at the top of the page, and look under modding, to save yourself some searching.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Sriseru on July 09, 2013, 09:59:57 PM
I've already given the Graphics thread a look, it's very informative and useful.
Thanks for pointing me in the right direction, though. =)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: JarlWolf on July 09, 2013, 11:32:58 PM
And if you need imagery for bases, you can ask me or take a look in our downloads section. I can easily find you sprites/ buildings that fit very well with a pallet, and if I put in some effort I can probably come up with something to fit your... theme.

Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Yitzi on July 09, 2013, 11:55:58 PM
I've had a look through the alphax file and I noticed those blank facilities and projects. I also noted three disabled techs which I assume I can replace.
I guess what I'm wondering is: if I replace a blank facility/project, how do I define what it does (for instance, increasing nutrient output)?

You ask a free .exe coder to do it for you, or learn how to do it yourself.  (I will probably be free for such requests sometime in the fall; I'm making good progress with my ideas, though there are no guarantees.  You might have to wait on line behind other people with requests, though.)  You can ask now, and if I really like it I might do it earlier, though chances are against it.

Quote from: Yitzi
Hm, I figured as much. If I can replace those three disabled techs, that would at least give me three free "slots".

You can indeed.

Quote
I'm also thinking of replacing the resonance and progenitor techs. Hey, if I replace Progenitor Psych, would that screw anything up, considering that Progenitor Psych enables communication between alien and human factions?

Whichever one you replace Progenitor Psych with will be the one that lets humans talk to aliens.  You can likewise replace the SMAC techs, but of course any features they have not listed in alphax (e.g. interludes triggered) will carry over to the new one.

Quote
Alright.
The first additional interlude would be triggered by the first declaration of Vendetta.
The second would be triggered by the first base lost to an enemy faction.
The third would be triggered by the first time a non-player faction becomes Planetary Governor.
The fourth would be triggered by the first time the player faction becomes Planetary Governor.
The fifth would be triggered by the first Planet Buster used.
Do you think it's possible to implement these?

I won't know for certain until I get to trying it, but they all seem quite possible.  I'd probably have to reduce the number of allowed landmarks to 63, though, just to make space for the listing of which interludes were already triggered.

Quote
I would really, really appreciate any help you would be willing to lend me. =)
Though, to be honest, I'm really curious as to how one would go about altering the code of SMAC/X. :3

Ollydbg is a disassembly/debugging program that works quite well for the purpose.  Of course, that does require learning assembly language and assembly-language programming.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Kilkakon on July 11, 2013, 03:31:19 PM
Haha welcome--glad that I broke the community in for ya. XD

Good luck with it. :)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Sigma on July 19, 2013, 01:27:51 PM
Has anyone actually suceeded in modifying the assembly code for the game in the way that has been proposed in this thread?
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Yitzi on July 19, 2013, 03:53:14 PM
Well, not those exact effects, but my patches consist mainly of similar sorts of features.  The only reason I'm not taking on these projects yet is because I'm not finished yet with the stuff I want to do first.  But all these things should be doable.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Sigma on July 19, 2013, 03:58:05 PM
I've seen mentioned on yours and others patches all over the place, but since I'm new to the site I haven't been able to find where any of them actually are.  I'd love to see what people who've been doing this for a long time have been able to accomplish.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Buster's Uncle on July 19, 2013, 04:00:37 PM
Check here for patches:  http://alphacentauri2.info/index.php?action=downloads;cat=2 (http://alphacentauri2.info/index.php?action=downloads;cat=2)

-And welcome to AC2!
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Kilkakon on July 27, 2013, 04:30:26 PM
Let us know if you need a hand or anything, Sriseru :)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Geo on July 27, 2013, 06:39:43 PM
One of the most frustrating things about modding interludes is that you can't change the triggers, alas.  (That would take .exe coding, which seems to be possible, but I've never seen it done; pretty much the top of my modding wish list is user-programmable interlude triggers.)

Are the interlude triggers somewhere posted on the forum? And if so, where?
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Buster's Uncle on July 27, 2013, 07:11:49 PM
There's an old thread at 'poly that seems very comprehensive...
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Geo on July 27, 2013, 11:39:09 PM
'kay. Guess I'll head over to 'Poly to search for it when the need arises. Thanks. :)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: sisko on July 29, 2013, 08:46:58 AM
@Geo: we have the info here at AC2 too
http://alphacentauri2.info/index.php?action=articles;sa=view;article=5 (http://alphacentauri2.info/index.php?action=articles;sa=view;article=5)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Geo on July 29, 2013, 05:43:05 PM
Thanks. I bookmarked the whole article thread for future reference.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: sisko on July 30, 2013, 07:59:06 AM
please note that the interludes are in some way connected to the map of Planet (hard-coded as i remeber).
an .exe modder should be able to tell us more about it.  ::)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Yitzi on July 30, 2013, 01:02:12 PM
please note that the interludes are in some way connected to the map of Planet (hard-coded as i remeber).
an .exe modder should be able to tell us more about it.  ::)

The interlude texts are not hardcoded, but their triggers are.  They're not connected to the map per se, but adding new interludes would require adding room for the flags saying what interludes were already gotten; since those flags need to be game-specific, the easiest way to do it would be to have them replace one of the slots allocated for landmarks (so you'd be limited to 63 landmarks).
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: sisko on July 30, 2013, 01:11:27 PM
Quote from: Yitzi
They're not connected to the map per se..
have you checked the code? i'm asking because i remember not being able to trigger any interlude on scenarios based on maps not named planet.MP or xplanet.MP, etc..
..and of course, removing such restriction would be needed once/if someone ( ..don't know who :D ) will give us the ability to edit/add the interlude triggers.

Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Yitzi on July 30, 2013, 01:16:02 PM
Quote from: Yitzi
They're not connected to the map per se..
have you checked the code? i'm asking because i remember not being able to trigger any interlude on scenarios based on maps not named planet.MP or xplanet.MP, etc..
..and of course, removing such restriction would be needed once/if someone ( ..don't know who :D ) will give us the ability to edit/add the interlude triggers.

I'm pretty sure I've gotten interludes on randomly generated maps.

It's possible that scenarios do not receive triggers, but that could be changed.  Although I'm planning to fix the difficulty bug so that it's easy to play non-scenario too.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: sisko on July 30, 2013, 01:23:34 PM
Quote
Although I'm planning to fix the difficulty bug..
what bug is that?
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Yitzi on July 30, 2013, 03:22:03 PM
Quote
Although I'm planning to fix the difficulty bug..
what bug is that?

Someone else can probably tell you more, but one reason that all the multiplayer games are scenarios is apparently that otherwise the difficulty for everyone but the first faction reverts to Librarian.

(The other reason is to get a balanced map, but I see that as an exercise in futility since different factions favor different map setups, so something like Veterans is still unbalanced in that it favors builders over momentum players.)
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Geo on August 10, 2013, 11:09:37 AM
The interlude texts are not hardcoded, but their triggers are.  They're not connected to the map per se, but adding new interludes would require adding room for the flags saying what interludes were already gotten; since those flags need to be game-specific, the easiest way to do it would be to have them replace one of the slots allocated for landmarks (so you'd be limited to 63 landmarks).

Are some triggers disabled in AX or something? I explored a bit on random maps and Map of Planet (with my mod in progress), but discovering for instance the Borehole Cluster or Manifold Nexus didn't activate an interlude.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Buster's Uncle on August 10, 2013, 02:23:19 PM
I don't think I ever seen those interludes in-game.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: Dio on August 10, 2013, 06:20:55 PM
I have seen those interludes trigger only in the original SMAC. I think they might have been used as a sort of hint about the eventual release of Alien Crossfire and the introduction of the alien factions.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: ars_belli on June 15, 2019, 01:00:50 PM
@Geo: we have the info here at AC2 too
http://alphacentauri2.info/index.php?action=articles;sa=view;article=5 (http://alphacentauri2.info/index.php?action=articles;sa=view;article=5)


Is there a listing for the AX interludes too?  I've (mostly) figured out the triggers for the human ones but not the ones for alien factions.
Title: Re: Adding Facilities, Secret Projects, and Interludes?
Post by: ars_belli on August 17, 2019, 11:18:47 AM
It is possible to give interludes to some factions and not others.  One can deny a faction an interlude by giving them whatever is required to trigger it.  This works for:
There are warnings in alpha.txt about giving secret projects, so I haven't tried this with the Voice of AC - linked Interludes, or the Transcendence ones.  (If you're giving a tech you may want to make it "empty" first by altering the tech tree.)
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 17.

[Show Queries]