Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Bug/Patch Discussion => Topic started by: Yitzi on November 07, 2012, 03:59:09 PM

Title: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 07, 2012, 03:59:09 PM
alpha.txt/alphax.txt is a wonderful tool.  But there are some important (often balance-affecting) variables which theoretically could be in there (thereby enabling mods) but aren't.  I'm wondering if any of the more programming-capable members of this forum would be interested in taking on the project (preferably for both SMAC and SMAX).  Here are some ideas of mine, but anyone who wants to add more should do so:

High priority:
-Including Scient's patch (possibly Kyrub's too), just because it's already done and most people will want to have the modding capability without giving up the bugfixes of the patch.

-Include variables for ecological mechanics (this is a big one, because it's potentially so important to the game):
   -Starting clean minerals (i.e. base is 16)
   -Clean minerals given per fungal pop (i.e. base is 1)
   -Clean minerals given per "magic facility" built (i.e. base is 1)
   -Clean minerals given per major atrocity (i.e. base is -5)
   -Maximum clean minerals (with some way to say "no maximum")
   -Minimum clean minerals (with some way to say "no minimum")
   -A flag determining whether a PLANET rating of 3 eliminates ecodamage completely (base is no)
   -The denominator of the ecodamage formula (base is 300)
   -Automatic ecodamage per base (base is 0; it should allow positive or negative numbers, though the final ecodamage will never be less than 0.)
   -A flag determining whether crawled spaces are counted as worked spaces in the base's radius when determining ecodamage.
   -A flag determining whether echelon mirrors and condensers are counted if next to the base's radius (or a worked square if that flag is yes.)
   -The bonus ecodamage from mirrors, condensers, and boreholes (base value is 6, 4, and 8 respectively.)
   -A flag that, if activated, changes improvement ecodamage to the following slightly different order (i.e. tree farms and hybrid forests don't help for bonus damage from advanced improvements):
      1. For each base, total the number of boreholes times, 8, echelon mirrors times 6, and condensers times 4 (or whatever numbers were set). 
      2. Reduce the result of step 1 by up to the number of forests.
      3. Total the number of mines, solar collectors, farms, soil enrichers, roads, mag tubes, condensers, and boreholes. Items in squares that are actually being worked count double.
      4. If the result of step 1 was reduced by less than the number of forests, reduce the result of step 3 by the remainder.
      5. Halve the result of step 4 for each base that has a tree farm, and eliminate it if it also has a hybrid forest.
      6. The sum of steps 2 and 5 is your total improvement ecodamage.

-Change the formula for upgrade costs, with more variables:
   -Cost per mineral line of the new unit. (base is 10)
   -Cost per square of the mineral lines of the new unit (this is if you want upgrading to be as expensive as hurrying.)
   -Refund per mineral line of the old unit.
   -Refund per square of the mineral line of the old unit.
   -Cost per added weapon cost (base is 10)
   -Cost per added armor cost (base is 10)
   -A flag that determines whether you can get energy if the new unit is refunds are higher than the costs (generally because you're upgrading to a cheaper unit by upgrading the reactor.)
-A variable that lets you make a global modifier for hurry costs (this is lower-priority for SMAX, due to the faction editor allowing faction-specific variables).

Lower priority:
-For SMAX, a flag that determines whether aliens can participate in cooperative victory; if it's set to "no", then it would probably be advisable to modify the AI for added suspicion across species as a result.  (Even without the AI modification, it would still be worth doing for multiplayer, although the fact that it can be house-ruled at the cost of ending scoring early is why it's low priority.)
-A variable that determines how far apart bases have to be from each other, and whether diagonals count.  (Base value is they need a distance of 2, not counting diagonals.)
-For each facility, entries that determine common effects (labs boost, psych boost, economy boost, mineral boost, drones suppressed.)
-A flag that, when set, modifies the Supercollider and Theory of Everything secret projects to also boost the boost from other facilities rather than just counting as twice a network node.  (So a city with network node, research hospital, fusion lab, and Supercollider would produce 5 times the base labs rather than only 3 and a half times.)
-And some things that other people have mentioned in another thread:
   -Make it possible to build monoliths if that option is enabled in the alpha(x) document.
   -Allow new rows and columns of social engineering choices.
   -Allow zero-movement units (probably at a cost decrease or defensive bonus.)
   -Allow beyond four reactor levels.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 07, 2012, 04:22:14 PM
Good idea starting a wish-list.  ;b;


-Allow more than seven factions at once.  (This is the most popular change request I hear over and over, going back years.)
-Add some user-programmable interlude triggers and greater flexability with interlude displays, such as more control over length (the option to go to a second page) and ability to insert pics.  (SMAC(X) is a superior game with the story-telling, and the GotM team/scenario creators  could sure get some use out of those options - it would allow us to insert our stories into the actual game.)


As I told Kyrub when I PMed him the other day, if someone wanted to be worshipped and adored like a GOD in this community, some .exe decompiling/coding skills and time to take requests would do it.  scient wishes he had time to just mod AC all the time - told me so the last time we spoke a few weeks ago.  DrazharLn is interested in this stuff, and I was coincidentally preparing to email him when I spotted this thread - but he has university and a grilfriend, so don't hold your breath.

The community definitely needs to find/nurture some coders, whatever it takes.  Everyone's been praying to scient for years, but he rarely finds time for his own project.  That pesky RL, y'know?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 07, 2012, 05:32:02 PM
One of the challenges of coding is simply figuring out the best methodology/programs to use, perhaps it would make sense, the next time you speak to the existing coders, to just find out what methodology they use (decompile/edit/recompile, or disassemble/edit/reassemble, or simply disassemble to figure out what's going on and then use a hex editor) and what programs (decompilers, disassemblers, tracers, etc.) they use to do it.  A rough guide to which lines are used for which mechanics (at least what's known) wouldn't hurt either, although care might need to be taken to avoid anything that could cause a legal problem due to being usable for copyright infringement*).

*Fortunately, SMAC/SMAX in the original (pre-GOG) sale seems not to have a EULA, so fair use principles should avoid legal problems with the rest of it. :danc:
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 07, 2012, 05:44:19 PM
Welcome to AC2, prid.  How did you hear about us?


One of the challenges of coding is simply figuring out the best methodology/programs to use, perhaps it would make sense, the next time you speak to the existing coders, to just find out what methodology they use (decompile/edit/recompile, or disassemble/edit/reassemble, or simply disassemble to figure out what's going on and then use a hex editor) and what programs (decompilers, disassemblers, tracers, etc.) they use to do it.  A rough guide to which lines are used for which mechanics (at least what's known) wouldn't hurt either, although care might need to be taken to avoid anything that could cause a legal problem due to being usable for copyright infringement*).

*Fortunately, SMAC/SMAX in the original (pre-GOG) sale seems not to have a EULA, so fair use principles should avoid legal problems with the rest of it. :danc:
I wouldn't know enough to ask intelligent questions or understand the answers - I'm not completely useless on technical stuff, but it's way, way outside my interests.  I'll try to steer those guys here to talk to you instead.  I did link this thread when I wrote Draz, though he's more interested in learning how than able to, last I know of.  He'll probably pick up more in university, as that's the sort of thing he's studying.

As to the legal issues, Firaxis actively tried to encourage AC modding in the original release, and to my knowlege has never reversed stances.  I think that would get some lawyer traction, but more to the point, very much leaves us in the ethical clear and indicates that it's very unlikely for lawyers to take interest as long as fan mods remain fan and nobody does anything to make a profit off their IP or undermine the ability of the IP owners to do so.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Rymdolov on November 07, 2012, 05:52:52 PM
-Allow more than seven factions at once.  (This is the most popular change request I hear over and over, going back years.)

I've requested this myself, but I think that chuft had a point when he said that fixing bugs should take precedence when scient has the time to do some programming. More than seven factions is probably a huge project.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 07, 2012, 06:04:14 PM
I'd say that fixing bugs should take precedence over most mods, but the mods that I marked as high priority are there for the most part because they're going to be usable to fix what many (including myself) would consider to be serious gameplay/balance issues, and so might be more important than relatively uncommon bugs.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 07, 2012, 06:07:07 PM
Well, we need more people working on these things, and then, perhaps, more than one area can be addressed...
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Rymdolov on November 07, 2012, 06:07:30 PM
I'd say that fixing bugs should take precedence over most mods, but the mods that I marked as high priority are there for the most part because they're going to be usable to fix what many (including myself) would consider to be serious gameplay/balance issues, and so might be more important than relatively uncommon bugs.

I'm with you on that one. A lot of the fun of the game is mod-related for many players and, as you say, balance issues are sometimes as important as bugs.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 07, 2012, 06:19:32 PM
To me, as a modder and part of a scenario creation team, and the creative end at that, the interludes mod is WAY more important than any bugs.  Seriously.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 07, 2012, 09:07:22 PM
I think the priorities can be roughly put as follows:
1. Bugs that show up fairly often and make the game unplayable.  (I think those are all licked)
2. Balance issues, and bugs that can be worked around or ignored if need be.
3. More general modding issues that a lot of people might want (more factions, variable-trigger interludes*, etc.).
4. Rare bugs.
5. Modding issues that are going to be used by maybe one or two people (artwork technically falls into this category, but can be done by people who can't do the programming and so gets higher treatment).

And of course whoever's actually doing the project can move anything they want to top priority.

*With a variable-trigger interlude, it's easy to further enable a two-page interlude you can make a two-page interlude; simply have two interludes with the same trigger.  In fact, I think there is already one such example, for building the Voice of Planet.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 07, 2012, 09:40:47 PM
Well, I do assume that it wouldn't be a major coding thing to lick - as is, the GotM team, especially sisko, did a lot of research for weeks into what can be done with interludes, before we gave it up for a bad job.  Programmable interlude triggers seems like a fairly obvious thing to have if you want to really tell an integrated story in a scenario.  What's available now is simply too limited and unreliable to be any use.  We can sometimes manage a victory one if it's not very long, and that's about all that's any use even trying.

One I forgot til now:

-Flygon's custom citizens display in the base screen (There's a thread here, and scient swore he was looking in to it when he fell out of touch...)
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Flygon on November 08, 2012, 05:34:11 AM
One I forgot til now:

-Flygon's custom citizens display in the base screen (There's a thread here, and scient swore he was looking in to it when he fell out of touch...)
Just to expand on that, Kilkakon and I had a discussion privately around two nights ago. Custom bioscans would also be pretty cool. :)
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 08, 2012, 05:17:16 PM
Would that take a coding mod, and not just new .flcs?  I guess coding if you want more than human & Prog, not simply replacing them for everyone.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: NewAgeOfPower on November 08, 2012, 06:20:41 PM
We have coders now?!?!

I can't wait.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 08, 2012, 06:23:49 PM
I WISH we had coders.  We need some.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 08, 2012, 06:59:57 PM
Well, we do have a few, the problem is that there aren't many and they don't have much time to code.  But if someone who knows how to contact them could ask them to provide suggestions regarding programs, techniques, and any known information about what does what, I suspect that would do a lot to make it easier for people to join the elite ranks of the coders.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 08, 2012, 07:12:18 PM
I sent Draz a link to this thread, although he's more of a "wants to learn".  He actually tried to sign up yesterday, but wants to hold out for openID 2.0.  Didn't say whether he'd looked at the thread.

So I suppose you think I should follow up on Kyrub with a link to this thread?  He probably hasn't seen my last PM yet. 

scient, I was in touch with until a few weeks ago, but currently have no way of contacting until he fixes his Skype and/or checks by Shs forums.  No idea if he ever got his IRC straightened out.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 08, 2012, 07:19:25 PM
I sent Draz a link to this thread, although he's more of a "wants to learn".  He actually tried to sign up yesterday, but wants to hold out for openID 2.0.  Didn't say whether he'd looked at the thread.

So I suppose you think I should follow up on Kyrub with a link to this thread?  He probably hasn't seen my last PM yet. 

scient, I was in touch with until a few weeks ago, but currently have no way of contacting until he fixes his Skype and/or checks by Shs forums.  No idea if he ever got his IRC straightened out.

I'd say it might make sense to send Kyrub a link so once he does get your PM he can get that too.  (By the way, I'm wondering how you PM'd him, he doesn't seem to be a member here, unless it's a different name.)
And hopefully scient will be back in communication soon.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 08, 2012, 07:29:17 PM
Well, I have to go over to Apolyton for Kyrub.  I believe he's also a member at CGN and CFC, but I haven't checked at those places to see when he was last by.  I just pinged him where he posted the most about his patch (and was therefore easiest to find.)  I'll go follow up now.

Okay, done.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 08, 2012, 08:45:33 PM
Thanks.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Green1 on November 08, 2012, 10:34:38 PM
I think the 7 faction cap should be priority number one over any tweaks. All the major bugs have all been licked with the exception of teaching the AI crawler use and more boreholes.

Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 08, 2012, 10:36:56 PM
It seems obvious -if not to the bug-fix crew, and with all gratitude and respect to them- that there is a VERY strong demand for some mods...
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 09, 2012, 12:00:00 AM
I think the 7 faction cap should be priority number one over any tweaks. All the major bugs have all been licked with the exception of teaching the AI crawler use and more boreholes.

Well, depends whether you define "it was intentionally put into the game, but makes the game unbalanced" as a major bug.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 09, 2012, 12:06:53 AM
No, depends on whether you care about that game mechanic more than something else.  Many, many people care about something else more.  Many would also object to having the way crawlers work altered.

It's all a matter of your POV.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Green1 on November 09, 2012, 10:51:23 PM
It seems obvious -if not to the bug-fix crew, and with all gratitude and respect to them- that there is a VERY strong demand for some mods...

Not just ANY mod, BU... but ones that add functionality to the game. Compare the number of DLs for TCM mods versus Kyrub's or Scient's.

I still, and will continue to push for the lifting of the 7 faction cap, teaching the AI to use crawlers the way humans do, and even a graphics mod when any talk on any forum mentions .exe changes.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 09, 2012, 10:54:31 PM
We just need to find a way to draw and nurture coders.  scient can't do it all.  Not four coders could handle all the requests that come in...
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Petek on November 10, 2012, 01:28:13 AM
Yitzi asked upthread how the SMACX exes were modified. In post #117 here (http://apolyton.net/showthread.php/181950-Fixing-SMACX-Bugs?p=5535948&viewfull=1#post5535948) scient provided links to the programs he used. Reading the entire thread (http://apolyton.net/showthread.php/181950-Fixing-SMACX-Bugs) (if you have several hours to spare) will give you an idea of the effort that went into scient's patch.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: NewAgeOfPower on November 10, 2012, 04:58:43 AM
I really want AIs to use Social Engineering and Crawlers.

And the ability to create locked-team games.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Impaler on November 10, 2012, 05:43:04 AM
Really like this idea.  Some of my requests would be.


- Planet Pearl multiplier per level, currently 10 (A huge some of credits can be made worm-wrangling).

- Technology cost Exponent, currently 2 (This is used to determine the rate at which tech costs scale, then cost is based on how many techs are know multiplied by the exponent).
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: NewAgeOfPower on November 10, 2012, 05:50:04 AM
I've made over 20,000 EC from farming worms before. No need for a multiplier.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 10, 2012, 11:26:57 PM
Yitzi asked upthread how the SMACX exes were modified. In post #117 here (http://apolyton.net/showthread.php/181950-Fixing-SMACX-Bugs?p=5535948&viewfull=1#post5535948) scient provided links to the programs he used. Reading the entire thread (http://apolyton.net/showthread.php/181950-Fixing-SMACX-Bugs) (if you have several hours to spare) will give you an idea of the effort that went into scient's patch.


Thanks, I'll take a look.

Update: Ok, I looked at it, and I think I have a working version of the debugger.  (It seems to work on another program; unfortunately, I don't have my SMAX CD with me at the moment so can't test it on SMAX.)  While there's a lot left to do, I now feel fairly certain that I will eventually be able to make my own .exe edits.  (I do not, however, intend to do anything that would require a change to the user interface, such as making it possible to have more than 7 factions outside a scenario; I suspect that would be far beyond my capabilities, due to the immense abstraction involved in GUIs.)
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Impaler on November 11, 2012, 02:20:57 AM
I've made over 20,000 EC from farming worms before. No need for a multiplier.

My intent is to lower the Cash Worms, by reducing the multiplier to say 5 from the current 10 so you get half as much.  The formula for payment would be Worm Level * Modifier.  I can't imagine anyone thinks it should be higher but hey if it floats your economy in your Single player game it's no skin off my drone.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Green1 on November 11, 2012, 05:13:55 AM
Man, Impaler.. I am telling you friend... a much better mod would be to tackle the 7 faction cap. You will be elevated to the status of godhood. Even Kyrub and Scient would be mere demigods in your pantheon.

There have been "balance" patches and alpha/x tweaks before. But nothing would compare to the DLs that lifts the cap. It could shut down AC2 in bandwidth and attract the notice of influential folks in the gaming community that lurk. Think Derek Paxton.

BTW, when scient decompiled, what language was SMAX written in? I am wondering if the code was easy to follow.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 11, 2012, 05:21:53 AM
Impaler's been a SMACer since ten years before the game was invented, but he's not a coder, man.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 11, 2012, 05:39:08 AM
BTW, when scient decompiled, what language was SMAX written in? I am wondering if the code was easy to follow.

It looks like it translated into assembly language.  Great for modifying things, doesn't require unreliable decompilation...but not at all easy to follow for anything more complicated than mathematical calculation.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 11, 2012, 05:41:17 AM
You've read the whole thread now, or mostly just the crucial post?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 11, 2012, 05:50:18 AM
Not the whole thread, but the crucial post, and a sampling of the thread.  It looks like the hard part was usually figuring out what was causing the bug; for modding-enabling fixes, that's not really as much of an issue, so such "fixes" would probably be less work-intensive than the sort of thing that scient did.  The hard part would just be finding which lines control the relevant mechanic, and replacing them with something that performs as desired.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 11, 2012, 05:55:58 AM
Probably easier than debugging code that's so hard to follow with all the function calls or whatever to elsewhere in the code. sure.  That makes sense.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Impaler on November 12, 2012, 12:18:44 AM
Impaler's been a SMACer since ten years before the game was invented, but he's not a coder, man.

Not a Coder!!!  Buster are you unaware of my Civ4 modding?  I was the Code host of Apolyton's Mod Cast for Chirons sake.  Admittedly I've never gotten into the code of SMAC because it needs to be disassembled and I don't have that in my skill set.

The two suggestion I made were to a degree informed by my understanding of code though, these are both things that can be done within the constraints of dis-assembly because they are singular math functions, a multiply for planet pearls (worm cash) and an exponent for tech cost.

Also with regard to exceeding 7 factions.  I don't think that's going to be possible, faction count is such a fundamental assumption of the games UI you would have to rewrite a ton of it and UI is hard enough to edit in source code, disassembled it would be a nightmare, not to mention all the locations in the underlying engine code which assume probably assume 7 factions, you would need to find every one of these spots to not crash the game. 

And lastly I just don't like the idea of more factions from a story and game-play perspective.  The whole SMAC story and mythos is built around the philosophical and ideological nature of the factions and the personification of that ideology in the form of the leaders.  The original 7 are nearly perfect in my opinion and you can see how weak the Cross Fire factions are in comparison.  The only ones I really like are the Pirates and Drones who are apolitical and proletariat respectively which are at least semi-ideological, and the Angels while ideological ambiguous do exemplify a popular strategy.  Everything else is rubbish  or redundant from an ideological point of view, particularly the Aliens.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 12, 2012, 12:27:43 AM
Yeah, I was unaware of your cIV coding.  Sorry 'bout that.  -Also, Buster is my niece.


I was never too impresed by the X factions, either.  Doesn't change that some newb comes in out of the cold somewhere and asks about it about every three months or so for years now.  And it's not just newbs, either.  That particular change is very much in demand.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 12, 2012, 12:37:54 AM
The two suggestion I made were to a degree informed by my understanding of code though, these are both things that can be done within the constraints of dis-assembly because they are singular math functions, a multiply for planet pearls (worm cash) and an exponent for tech cost.

I'm not sure that assembly can handle exponents other than via looped multiplication.

Quote
Also with regard to exceeding 7 factions.  I don't think that's going to be possible, faction count is such a fundamental assumption of the games UI you would have to rewrite a ton of it

Now that I think of it, you're probably right; it shows up not only when making the game, but also with infiltrator/pact brother info and the communications.  So a more-than-seven-factions mod, while no doubt popular, is probably not going to happen with the possible exception of if someone wants to rework the relevant parts of the UI to something far simpler (and uglier), which might allow a more-than-seven-factions mod.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Impaler on November 12, 2012, 04:14:40 AM
The two suggestion I made were to a degree informed by my understanding of code though, these are both things that can be done within the constraints of dis-assembly because they are singular math functions, a multiply for planet pearls (worm cash) and an exponent for tech cost.

I'm not sure that assembly can handle exponents other than via looped multiplication.

An exponent is done by calls to standard math libraries, the original code probably just uses multiplies the variable by itself X * X so its not quite super simple but it's certainly do able.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Kilkakon on November 12, 2012, 12:35:23 PM
My personal complaint (well my friend's one who is the only guy who likes LE haha) is that we can have a button to block AIs hassling the player. When you're winning against an AI and they want a Blood Truce (but not to surrender) then every single unit that moves or attacks in range of one of their cities results in them trying to contact the player. A cap on the number of times they can do that a turn would be great.

Of course, as people say, >7 factions is probably the biggest want everybody has.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 13, 2012, 12:40:42 AM
Also with regard to exceeding 7 factions.  I don't think that's going to be possible, faction count is such a fundamental assumption of the games UI you would have to rewrite a ton of it

Now that I think of it, you're probably right; it shows up not only when making the game, but also with infiltrator/pact brother info and the communications.  So a more-than-seven-factions mod, while no doubt popular, is probably not going to happen with the possible exception of if someone wants to rework the relevant parts of the UI to something far simpler (and uglier), which might allow a more-than-seven-factions mod.
This strays into my area of expertise a little, so you guys tell me if my logic works here:

It's pretty safe to assume that everyone's machine these days can handle over twice the resolution, yes?  It wouldn't save our hypothetical mod coder all the soul-crushing no-doubt tedious work, but the simplest mod to the UI is to add a second row of leaders to the council screen under the first - possbly the function key screens, too.  It wouldn't be hard to make room.  A lot of piddling crap would still have to be tracked down in the code still, but what I'm suggesting would be a minor redesign that probably wouldn't even call for my services drawing anything.  It's definitely doable should a coder/decompiler be willing and have enough time to attend to the details, yes?

I do acknowledge the soul-crushing, no-doubt tedious, work I'm proposing for someone else...
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 13, 2012, 01:02:54 AM
Also with regard to exceeding 7 factions.  I don't think that's going to be possible, faction count is such a fundamental assumption of the games UI you would have to rewrite a ton of it

Now that I think of it, you're probably right; it shows up not only when making the game, but also with infiltrator/pact brother info and the communications.  So a more-than-seven-factions mod, while no doubt popular, is probably not going to happen with the possible exception of if someone wants to rework the relevant parts of the UI to something far simpler (and uglier), which might allow a more-than-seven-factions mod.
This strays into my area of expertise a little, so you guys tell me if my logic works here:

It's pretty safe to assume that everyone's machine these days can handle over twice the resolution, yes?  It wouldn't save our hypothetical mod coder all the soul-crushing no-doubt tedious work, but the simplest mod to the UI is to add a second row of leaders to the council screen under the first - possbly the function key screens, too.  It wouldn't be hard to make room.  A lot of piddling crap would still have to be tracked down in the code still, but what I'm suggesting would be a minor redesign that probably wouldn't even call for my services drawing anything.  It's definitely doable should a coder/decompiler be willing and have enough time to attend to the details, yes?

I do acknowledge the soul-crushing, no-doubt tedious, work I'm proposing for someone else...

If someone could track down all the stuff that determines what icons go where (very difficult with normal debugging tools as I understand it, since it's not an "active" thing, then it would be merely extremely tedious to copy it all over.  But that's a big if.

The problem with GUIs using assembly isn't making room for the graphics; it's the fact that non-command-line interfaces are (at least if my layman's knowledge is correct) some of the least assembly-friendly things that can be done with computers, because they're so very non-mathematical.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 13, 2012, 01:17:57 AM
I know scient is familiar with some of that; I made up a set of negative resource icons for him almost four years ago, now, that's never, to my knowlege, gotten used -yet.  I couldn't say how familiar for sure, just that he either knew what code or was very confident.  He knew exactly what he wanted and how he wanted it arranged, anyway...

My impression was that the UI part was pretty straightforward; know the screen coordinates, know the coordinates in the graphic file.  Couldn't speak to the rest - I never finished learning BASIC back in the day, though I know the basics. ;)
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on November 13, 2012, 01:42:46 AM
I know scient is familiar with some of that; I made up a set of negative resource icons for him almost four years ago, now, that's never, to my knowlege, gotten used -yet.  I couldn't say how familiar for sure, just that he either knew what code or was very confident.  He knew exactly what he wanted and how he wanted it arranged, anyway...

My impression was that the UI part was pretty straightforward; know the screen coordinates, know the coordinates in the graphic file.  Couldn't speak to the rest - I never finished learning BASIC back in the day, though I know the basics. ;)

Maybe I'm mistaken and it isn't that difficult.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 13, 2012, 02:28:07 AM
Well, you know, nothing in programming is ever that simple.  If it was only the GUI, I'd be sure it was doable - but there's no way that changing one thing wouldn't change others we haven't thought of.

I'm just saying the the interface problem ought to be possible to overcome...
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Pickly on November 13, 2012, 05:33:11 AM
Out of curiosity, what sorts of programs are you using to do this sort of modding?  (Might try some stuff out, unless doing this sort of thing can screw up the rest of my computer.)
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 13, 2012, 05:42:03 AM
Check at Petek's link:

Yitzi asked upthread how the SMACX exes were modified. In post #117 here (http://apolyton.net/showthread.php/181950-Fixing-SMACX-Bugs?p=5535948&viewfull=1#post5535948) scient provided links to the programs he used. Reading the entire thread (http://apolyton.net/showthread.php/181950-Fixing-SMACX-Bugs) (if you have several hours to spare) will give you an idea of the effort that went into scient's patch.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Kilkakon on November 14, 2012, 02:58:07 AM
I'd also like the AI to actually use PSI Gates.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Green1 on November 23, 2012, 08:03:34 PM
I'd also like the AI to actually use PSI Gates.

Unrelated, but there was some alternate Alien faction called the Cthullu cult that got automatic Psi Gates in one old AAR I read? I thought the AI did use them.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on November 23, 2012, 08:14:13 PM
That would be in chuft's Lazymod, and what you say sounds fuzzily familiar.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: sisko on November 23, 2012, 08:26:02 PM
being an aquatic faction they are almost 'forced' to use the psi gates..
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Kilkakon on November 25, 2012, 08:47:14 AM
My concern with the gates is that I have my new faction in LE: (-3 SUPPORT, -1 PROBE, -1 PLANET, free Psi Gates). The AI plays them like a normal faction and doesn't use the gates frequently like they should be.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: kyrub on January 05, 2013, 12:00:59 AM
alpha.txt/alphax.txt is a wonderful tool.  But there are some important (often balance-affecting) variables which theoretically could be in there (thereby enabling mods) but aren't.  I'm wondering if any of the more programming-capable members of this forum would be interested in taking on the project (preferably for both SMAC and SMAX). 

Just to quote this first post idea again:
The general idea to mod alpha.txt usage is actually quite good because it should be relatively simple to do. Simple means it does not require a lot of time to do, probably, so I could actually try a few changes.

There are however severe limits (for the sake of simplicity) :
1) we need to use unused/unfonctional entries in alpha.txt
2) or we need to free the options that are not modded in general or those that are in most cases not used for modding
3) these addresses should then be easy to employ for new values
4) alternatively, we can modify the way things in alpha.txt work now

However, the more complicated you make the condition (special flags doing this or that), the harder it is to put it in the code. The simplest way is:  write the value in alpha.txt, use the value. Personnally, I am fond of new units value formulas, the original system is quite inflexible.


So, first the community needs to find a consensus about the priorities for alpha.txt, the unused entries, the new ones, then we may look into the possible changes.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Kilkakon on January 05, 2013, 02:59:15 PM
Hey Kyrub! Good to see you here, thanks for encouraging me ages ago.

Should we have a poll or decision about what's most important?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: kyrub on January 06, 2013, 12:00:05 AM

-Include variables for ecological mechanics (this is a big one, because it's potentially so important to the game):
   -Starting clean minerals (i.e. base is 16)
   -Clean minerals given per fungal pop (i.e. base is 1)
   -Clean minerals given per "magic facility" built (i.e. base is 1)
   -Clean minerals given per major atrocity (i.e. base is -5)

   -The bonus ecodamage from mirrors, condensers, and boreholes (base value is 6, 4, and 8 respectively.)

-Change the formula for upgrade costs, with more variables:
   -Cost per mineral line of the new unit. (base is 10)
    -Cost per added weapon cost (base is 10)
   -Cost per added armor cost (base is 10)
 
-A variable that determines how far apart bases have to be from each other, and whether diagonals count.  (Base value is they need a distance of 2, not counting diagonals.)
-For each facility, entries that determine common effects (labs boost, psych boost, economy boost, mineral boost, drones suppressed.)

   -Allow zero-movement units (probably at a cost decrease or defensive bonus.)

These things are examples of what I think (without looking in the code) should be relatively easy to achieve.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on January 06, 2013, 03:07:35 AM
Just to quote this first post idea again:
The general idea to mod alpha.txt usage is actually quite good because it should be relatively simple to do. Simple means it does not require a lot of time to do, probably, so I could actually try a few changes.

I've actually started working on it, but if you want to coordinate just send me a message.

Quote
1) we need to use unused/unfonctional entries in alpha.txt

Actually, this is not true.  I found how to add more lines and have it load them.  The maximum landmark count was an unavoidable casualty, though (down from 64 to 47, though that leaves room for a lot more variables.)

Quote
However, the more complicated you make the condition (special flags doing this or that), the harder it is to put it in the code.

Actually I've found it to be fairly easy; complicated effects are difficult, but flags are fairly easy (just have it check the value and do a conditional jump.)

Quote
Personnally, I am fond of new units value formulas, the original system is quite inflexible.

I've currently got a whole bunch of my own ideas (not exactly those in the OP, and including the planetpearl multiplier idea suggested by Impaler) to work through, but if you want to do it, or want to help me with mine and then get my help with yours, we can do that.  (Just let me know if you want to do it, so I can give you my current version and instructions on how to add more values.)

These things are examples of what I think (without looking in the code) should be relatively easy to achieve.
Now that I have more of a sense of how things work, whether diagonals count for minimum base distance might actually be tricky (default apparently is actually that diagonals do count).  The following are the only ones that were mentioned that I can find that I think might not be feasible:
-All the ecodamage flags I mentioned in the OP, except "value of 3 eliminates ecodamage completely".  However, there are a few more ecodamage flags that I thought of afterward, and have almost finished implementing.
-The AI modification if cross-species cooperative victory is disabled; you're the expert on AI, though.  (That said, I think it might be better just to house-rule that bit anyway.)
-Diagonals for minimum base distance.
-Monolith building
-More social engineering options
-More than seven factions
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on January 06, 2013, 03:09:55 AM
While we're on the topic, I might as well give the list of what I'm planning to add in the first batch, together with the default values (it also is followed by (inactive) and a sequence of numbers and letters; that's for my own personal use when modding and I just haven't bothered to remove it):
8        ; Bonus borehole ecodamage (inactive) (0094A180)
6        ; Bonus mirror ecodamage (inactive) (0094A184)
4        ; Bonus condenser ecodamage (inactive) (0094A188)
0        ; If non-zero, borehole count per base is squared when determining ecodamage (inactive) (0094A18C)
16,      ; Starting "clean minerals" (inactive) (0094A190)
1,       ; CM per fungal pop (inactive) (0094A194)
1,       ; CM per relevant facility (inactive) (0094A198)
5,       ; Extra damage per relevant atrocity/missile (inactive) (0094A19C)
0,       ; If non-zero, fungal pops and facilities reduce the effects of atrocities/missiles but do not increase CM (inactive) (0094A1A0)
0,       ; If non-zero, ecodamage is based off Planet Busters rather than major atrocities (inactive) (0094A1A4)
1,       ; Mineral divisor for ecodamage (applied before clean minerals) (inactive) (0094A1A8)
300,     ; Ecodamage divisor (inactive) (0094A1AC)
0,       ; Extra ecodamage per base (inactive) (0094A1B0)
10,      ; Upgrade cost per row of new unit (inactive) (0094A1B4)
0,       ; Upgrade discount per row of old unit (inactive) (0094A1B8)
0,       ; Upgrade cost per square of new unit rows (inactive) (0094A1BC)
0,       ; Upgrade discount per square of old unit rows (inactive) (0094A1C0)
10,      ; Upgrade cost per weapon difference (inactive) (0094A1C4)
10,      ; Upgrade cost per armor difference (inactive) (0094A1C8)
10,      ; Planetpearls multiplier (inactive) (0094A1CC)
-1,      ; Nutrients granted by condenser; -1 is +50%, minimum 1 (inactive) (0094A1D0)
2,       ; Bonus speed per reactor for needlejets (inactive) (0094A1D4)
2,       ; Bonus speed per reactor for copters (inactive) (0094A1D8)
2,       ; Bonus speed per reactor for gravships (inactive) (0094A1DC)
2,       ; Bonus speed per reactor for missiles (inactive) (0094A1E0)
0,       ; Crawler resource penalty (inactive) (0094A1E4)
0,       ; If nonzero, energy-boosting projects boost the total amount (inactive) (0094A1E8)
1,       ; If nonzero, creches increase morale of units built with negative morale (inactive) (0094A1EC)
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Kilkakon on January 06, 2013, 11:23:14 AM
I suggest either shipping a copy of a modified alphax.txt or having the values default to normal, for compatibility's sake. :)

Personally, I would love to see more units.pcx slots, by having them extend to the other columns (that would really get my morale going for modding! :D). That and stopping the AI pester every single time a unit is moved into range for peace, once a turn is enough.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on January 06, 2013, 12:46:43 PM
I suggest either shipping a copy of a modified alphax.txt or having the values default to normal, for compatibility's sake. :)

Unfortunately, having the values default to normal would be a lot harder than simply including a modified alphax.txt (with the normal values) and updating all necessary saved games, so I will simply be doing the latter.

Quote
Personally, I would love to see more units.pcx slots, by having them extend to the other columns (that would really get my morale going for modding! :D).

I'm not sure what that means.

Quote
That and stopping the AI pester every single time a unit is moved into range for peace, once a turn is enough.

AI is more Kyrub's department, but it might be doable...I doubt it'll be easy, though.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: kyrub on January 06, 2013, 08:20:36 PM
I've actually started working on it, but if you want to coordinate just send me a message.
Oh, you are on it, Yitzi. Very well! No need of my interference then, the perfect scenario.


The following are the only ones that were mentioned that I can find that I think might not be feasible:
-The AI modification if cross-species cooperative victory is disabled; you're the expert on AI, though.  (That said, I think it might be better just to house-rule that bit anyway.)
No idea how/where.
Quote
-Diagonals for minimum base distance.
This I think I can help with.
Quote
-Monolith building
Neither.
Quote
-More social engineering options
Sadly, this is quite complex, as it requires AI changes and changes in interface.
Quote
-More than seven factions
NEVER.


Personnally, I would wage including a variable from the hidden formula that manages sudden worm appearance. This is quite important for any modding of Green policy, worm farming etc. The game is extremely biased against anybody who owns a lot of worms already... Poor conception.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on January 06, 2013, 11:08:43 PM
Oh, you are on it, Yitzi. Very well! No need of my interference then, the perfect scenario.

Of course, two people coordinating might do it faster than one...up to you, though.

Quote
Quote
-Diagonals for minimum base distance.
This I think I can help with.

If you can, it would be nice, but I suspect it might just use a general "distance calculator" subroutine rather than a specific search, in which case it might not be feasible to change just that bit.

Quote
Sadly, this is quite complex, as it requires AI changes and changes in interface.

The changes in interface and changes in data info are why I don't think it can be done.

Quote
NEVER.

Well, at least not unless we can get GOG to add various patches and upgrades to the source code and get it that way.  But the assumption of the number of factions is simply too pervasive to have a realistic chance of modifying otherwise.

Quote
Personnally, I would wage including a variable from the hidden formula that manages sudden worm appearance. This is quite important for any modding of Green policy, worm farming etc. The game is extremely biased against anybody who owns a lot of worms already... Poor conception.

I understood that having a lot of worms decreases the chance of worm capture, but not of worm appearance.  If so, it's a very sensible rule, as it prevents native strategies from going totally out of control.

Also, I feel that modding of Green policy is best done via changing the ecodamage rules (so that PLANET rating is important for builders), and I'd want to make worm farming completely unprofitable if looking only at Planetpearls (i.e. it needs worm capture to make it profitable.)[/quote]
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Lord Avalon on January 06, 2013, 11:46:34 PM
Isn't there a unit limit bug that needs to be fixed before you can even think of increasing number of players?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on January 07, 2013, 12:31:29 AM
Isn't there a unit limit bug that needs to be fixed before you can even think of increasing number of players?

I'm pretty sure that the problem with attempts to lift the unit limit is the same as one of the problems with increasing the number of players: There's no room for the data.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Kilkakon on January 07, 2013, 11:35:03 AM
Quote
Personally, I would love to see more units.pcx slots, by having them extend to the other columns (that would really get my morale going for modding! :D).

I'm not sure what that means.
By default, the game has nine slots for unit graphics, in units.pcx, one per row. Native units have graphics for each level of veterancy, by going along the columns. What I would like is to have values above 8, which allow use of the other columns rather than just the first. Sure this would give some overlap with higher level natives, but this way more flexiblity is given to modders so they can have more custom units.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on January 07, 2013, 03:50:05 PM
By default, the game has nine slots for unit graphics, in units.pcx, one per row. Native units have graphics for each level of veterancy, by going along the columns. What I would like is to have values above 8, which allow use of the other columns rather than just the first. Sure this would give some overlap with higher level natives, but this way more flexiblity is given to modders so they can have more custom units.

That would require looking at how it handles the graphics, which could be a bit tricky; it might be possible, though.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Kilkakon on January 14, 2013, 03:15:34 AM
If you can do that and it will work on my laptop then you will be bombarded by hugs from random people you never knew existed. :O Either that or some other, highly positive yet obsure thing.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Mart on January 14, 2013, 06:28:35 PM
While we're on the topic, I might as well give the list of what I'm planning to add in the first batch, together with the default values (it also is followed by (inactive) and a sequence of numbers and letters; that's for my own personal use when modding and I just haven't bothered to remove it):
8        ; Bonus borehole ecodamage (inactive) (0094A180)
6        ; Bonus mirror ecodamage (inactive) (0094A184)
...
So is it possible to make these active and make them required in alphax.txt?
This would enhance modding, e.g. I already see a lot of application in fine-tuning ecodamage.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on January 14, 2013, 11:11:12 PM
So is it possible to make these active and make them required in alphax.txt?

It's done in my patch 1.1, available for download right now.  Patch 1.1 has all the ecodamage variables activated.

Quote
This would enhance modding, e.g. I already see a lot of application in fine-tuning ecodamage.

Indeed.  That's the idea.

By the way: Here's an idea for a scenario someone might want to make: The Usurpers have just destroyed everyone else with Planet Busters, but now Planet itself is attacking them, and somehow blocking attempts to contact the home world.  To make matters worse, it doesn't seem interested in concessions, and the more it attacks them, the angrier it gets.  Their only hope is to go through with the plan and attain Transcendence.

(Special rules/setup:  Set starting clean minerals to 0, 0 clean minerals per facility, and -1 clean minerals per fungal pop (-5 for hard mode).  Set the tech for centauri preserves, temples of Planet, and subspace generators to "disable", and remove the PLANET bonus from Green and Cybernetic.  Disable conquest and economic victory via the in-game rules. Make a typical midgame game (with the Usurpers having recently gotten Orbital Spaceflight) and have the Usurpers let off a whole bunch of Planet Busters to destroy everyone else.  The player's goal is then to win via Transcendence before either he is overrun by Mind Worms, or time runs out.)
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on April 17, 2013, 12:06:29 AM
How'sabout I sticky this thread for wish-list requests and discussion of same?  Ought to be handy to have a place for that and keep it consolidated...
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on April 17, 2013, 01:03:11 AM
How'sabout I sticky this thread for wish-list requests and discussion of same?  Ought to be handy to have a place for that and keep it consolidated...

Ok, though unless I think it's a really good idea it'll probably wait until version 3 or 4 of my patch (or until Scient gets to it.)
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on April 17, 2013, 01:18:00 AM
Okay; if anyone has a better idea or needs anything, let me know.

You know folks, one way to contribute to the project(s) is as a collator - dig around and find threads in other folders about bugs/patches/exe modding and point them out to me to move here.  Go through the really long and/or complex discussions and post a summary at the end - stuff like that.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on April 25, 2013, 11:37:53 PM
This is way off the track, but would someone, anyone, please please PLEASE find a way to crack the (antique and proprietary) .cvr format most of the units are saved in so they can be modified?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Kilkakon on April 28, 2013, 07:11:54 AM
Oh agreed.

I still want:
- Diplomacy overrides in faction.txt. E.g. tech trade offer
- More units.pcx slots
- AI only chats once per turn
- Faction theme music/stinger which plays on diplomacy
- Faction specific citizens (and maybe talent/drone popups)
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Flygon on April 28, 2013, 07:17:47 AM
This is way off the track, but would someone, anyone, please please PLEASE find a way to crack the (antique and proprietary) .cvr format most of the units are saved in so they can be modified?
A while ago, I contacted as many people as possible about if they had any information about the format. I didn't really get anywhere, beyond the whole Caviar viewer.

Honestly, I'm suspecting this'll either need really diehard fans of games that use this format that have the skills regarding cracking this sort of file format... or a lot of money.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on April 28, 2013, 11:56:00 PM
DrazharLN put a lot of work into researching that and contacting people as well a few years ago.  No joy for him, either.

...

So, when you've used up all your faction's basenames, and you've burned through all the [Greek letter] Sector defaults, you get [Your Faction Name] 52, yes?  It's not a thing of beauty, but it serves adequately.  Trouble is, the base after that still defaults to [Your Faction Name] 52

How impractical would it be to jigger that sucker to count up automatically, so I don't have to keep canceling base foundings to go look up what the number is up to now?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on April 29, 2013, 01:04:51 AM
How impractical would it be to jigger that sucker to count up automatically, so I don't have to keep canceling base foundings to go look up what the number is up to now?

It would take some investigation (mainly of where it determines the base name, possibly of how it determines what number base it is, and various existing functions for adding strings), but unless there are some extremely unexpected surprises, it should be doable.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on April 29, 2013, 01:31:41 AM
Betcha it's not, alas.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: AndroAsc on May 26, 2013, 11:04:10 PM
Is there any change that the source code of SMAX can be obtained, so that we can mod stuff like the incredibly limiting unit limit of 2048? I don't need a unit limit of 2 billion (in reference to Scient's original patch), even even a 20k unit limit would make wonders in making the game more playable as it is, cause I can never finish a game....!
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on May 26, 2013, 11:22:32 PM
You might want to consider simply increasing unit/facility/project costs in order to keep unit numbers down.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Petek on May 27, 2013, 01:33:17 AM
I suspect, but am not certain, that GOG has the source code for SMAC and SMAX. I say this because GOG's versions of terran(x).exe are slightly larger than both the pre-GOG official versions and the unofficial patches. Perhaps one of the exe-modders can comment. My understanding is that to alter the size of one of the exe files requires recompiling the source code. Is that correct?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on May 27, 2013, 01:38:25 AM
That makes sense.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Kilkakon on June 01, 2013, 02:23:39 AM
Maybe--I say maybe because several rom hacking utilities allow increasing rom sizes and they wouldn't have source. GOG probably does have it though.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Sigma on July 24, 2013, 04:32:45 PM
Is this still the patch wishlist thread?

What about modifying random events such as Prometheus outbreaks, power surges or meteor showers? Not necessarily their functions but their names, probably or game text, or maybe the facilities/projects that negate their effect?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on July 24, 2013, 06:28:36 PM
Is this still the patch wishlist thread?

What about modifying random events such as Prometheus outbreaks, power surges or meteor showers? Not necessarily their functions but their names, probably or game text, or maybe the facilities/projects that negate their effect?

The game text (which probably includes all mention of their names) is found in Script.txt and can be edited as plaintext.  Which facilities/projects negate their effects could be a future modification.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: xoid on August 20, 2013, 06:45:01 AM
Not sure if this has been mentioned before, but would it be possible to have a unit require two techs?

Also, what about fixing prototyping? I’m given to understand there are minor issues with it and modding new units into alpha(x).txt.

Finally, I’d like to tinker with the tech tree but there’s only 2–3 unused techs in SMAX.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on August 20, 2013, 06:50:18 AM
Not sure if this has been mentioned before, but would it be possible to have a unit require two techs?

There could probably be a special ability added "requires an additional tech" with that tech determined in the RULES section.  It could not, however, be added directly to the unit data.

Quote
Also, what about fixing prototyping? I’m given to understand there are minor issues with it and modding new units into alpha(x).txt.

I don't know enough about the problem to say whether it can be fixed.

Quote
Finally, I’d like to tinker with the tech tree but there’s only 2–3 unused techs in SMAX.

You could remove techs that are already there to free up more...but increasing the total number is not feasible.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: xoid on August 20, 2013, 12:48:04 PM
Figured as much, at least regarding 1 and 3. I know you can get around it by skilfully manipulating the tech tree so that the two techs in question enable a third that also seems like an adequate predicate, and then screwing around elsewhere to fix imbalances introduced by having jumbled the tech tree. Or, alternatively, by opening potentially new paradigms (Sea Formers→DocFlex; Formers→None; most basic terraforming options→Ecology), but neither is usually feasible without a lot of forethought, and even then there’s no guarantees.

As for 2, IIRC, pre-designed units with components you technically lack can be built (which is a good thing) but building them counts as prototyping all components thereof… even the ones you lack. e.g., Stock probe teams use the speeder chassis so building them counts as prototyping the speeder chassis, but not only without the tech required, but also without having to pay the premium associated with prototyping. At least, that’s been my experience. I’m not sure if that was what one of the forum veterans was talking about, or if his was another unrelated issue regarding prototyping and stock units. I’ll try to hunt down the thread later.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on August 20, 2013, 01:17:10 PM
Figured as much, at least regarding 1 and 3. I know you can get around it by skilfully manipulating the tech tree so that the two techs in question enable a third that also seems like an adequate predicate, and then screwing around elsewhere to fix imbalances introduced by having jumbled the tech tree. Or, alternatively, by opening potentially new paradigms (Sea Formers→DocFlex; Formers→None; most basic terraforming options→Ecology), but neither is usually feasible without a lot of forethought, and even then there’s no guarantees.

Actually, for something like Sea Formers, there is a work-around: If you set the prerequisite of a pre-made unit to Disable (or just haven't learned its tech yet), I think you can still build it if you have all the necessary techs to custom design it.  Although that asterisk before the name might be necessary, I'm not sure.

Quote
As for 2, IIRC, pre-designed units with components you technically lack can be built (which is a good thing) but building them counts as prototyping all components thereof… even the ones you lack. e.g., Stock probe teams use the speeder chassis so building them counts as prototyping the speeder chassis, but not only without the tech required, but also without having to pay the premium associated with prototyping. At least, that’s been my experience. I’m not sure if that was what one of the forum veterans was talking about, or if his was another unrelated issue regarding prototyping and stock units. I’ll try to hunt down the thread later.

I'm not sure that would be considered a bug, since you are in fact building something with those components.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: xoid on August 20, 2013, 02:10:34 PM
Actually, for something like Sea Formers, there is a work-around: If you set the prerequisite of a pre-made unit to Disable (or just haven't learned its tech yet), I think you can still build it if you have all the necessary techs to custom design it.  Although that asterisk before the name might be necessary, I'm not sure.

I swear that I tried that and it didn’t work. I’ll hazard a guess and say that I probably screwed something up somewhere, or maybe I was editing the wrong alpha(x).txt again. (Note to self: stop modding at four in the morning.)

I'm not sure that would be considered a bug, since you are in fact building something with those components.

The successful prototyping of a component you don’t have is not so much a bug as it is one of the flaws in the workaround Firaxis fell afoul of when ‘giving’ the probe team 2 movement. TBH, they really should’ve just added a flag or value to give an extra movement point instead of the kludge of re‐purposing the speeder. The lack of the additional cost to prototype that component though?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on August 20, 2013, 04:43:16 PM
Actually, for something like Sea Formers, there is a work-around: If you set the prerequisite of a pre-made unit to Disable (or just haven't learned its tech yet), I think you can still build it if you have all the necessary techs to custom design it.  Although that asterisk before the name might be necessary, I'm not sure.

I swear that I tried that and it didn’t work. I’ll hazard a guess and say that I probably screwed something up somewhere, or maybe I was editing the wrong alpha(x).txt again. (Note to self: stop modding at four in the morning.)

I'm not sure that would be considered a bug, since you are in fact building something with those components.

The successful prototyping of a component you don’t have is not so much a bug as it is one of the flaws in the workaround Firaxis fell afoul of when ‘giving’ the probe team 2 movement. TBH, they really should’ve just added a flag or value to give an extra movement point instead of the kludge of re‐purposing the speeder. The lack of the additional cost to prototype that component though?

Is there such a lack of additional cost?  If you prototyped the probe team module already (with an infantry or foil chassis) and then want to build the predesigned version, isn't that going to still have a prototype cost?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Kilkakon on August 21, 2013, 01:51:16 AM
From memory the * removed it from datalinks.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: xoid on August 21, 2013, 10:18:19 AM
Is there such a lack of additional cost?  If you prototyped the probe team module already (with an infantry or foil chassis) and then want to build the predesigned version, isn't that going to still have a prototype cost?
That’s just it, pre‐designed units automatically and freely prototype all their components. If you cannot build the Probe Team, then building a unit with the speeder chassis incurs the prototyping cost. Once you get access to the Probe Team though, the speeder chassis is automatically prototyped because, despite what they look like, the default Probe Teams actually use the speeder chassis.

This isn’t that much of a concern with most units, but can be exploited in the stock game. It can easily get worse if you add more pre‐designed units, especially higher end ones.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on August 21, 2013, 01:11:06 PM
Is there such a lack of additional cost?  If you prototyped the probe team module already (with an infantry or foil chassis) and then want to build the predesigned version, isn't that going to still have a prototype cost?
That’s just it, pre‐designed units automatically and freely prototype all their components. If you cannot build the Probe Team, then building a unit with the speeder chassis incurs the prototyping cost. Once you get access to the Probe Team though, the speeder chassis is automatically prototyped because, despite what they look like, the default Probe Teams actually use the speeder chassis.

This isn’t that much of a concern with most units, but can be exploited in the stock game. It can easily get worse if you add more pre‐designed units, especially higher end ones.

Ah, you mean predesigned units don't cost prototyping, but still make the existing component not need prototyping.

How's this: If you take a poll as to whether this is in fact a bug, and what (if anything) should be done instead, I can probably implement whatever is decided.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: PvtHudson on September 12, 2013, 10:13:53 AM
Hi, all. Hail to the gods of .exe modding!
I wonder, what would the warfare aspect of the game looks like if the following rule would be implemented:
Air units are unable to destroy land units. Air units can merely reduce land units' strength to 10% in the field and to 50% in base or bunker. What if some artillery routines can be leveraged to achieve this? Should probe teams be exception from this rule is an open question.
Such a change would probably limit ubiquitous chop'n'drop tactic, but at a cost of higher aircraft survivability (e.g., aircraft attacks AAA in a base, reduces it to 50% and limps away at 10% strength, while otherwise AAA could win with 40% strength remaining).
PS: sorry for my English.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on September 12, 2013, 02:07:22 PM
Nothing to apologize for; your English is easy to understand.  Welcome to AC2!
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on September 12, 2013, 02:09:59 PM
I wonder, what would the warfare aspect of the game looks like if the following rule would be implemented:
Air units are unable to destroy land units. Air units can merely reduce land units' strength to 10% in the field and to 50% in base or bunker. What if some artillery routines can be leveraged to achieve this? Should probe teams be exception from this rule is an open question.

Interesting idea...it would take some work to implement (it'd probably be based more off the disengage rules than artillery, as artillery would mean that the air unit doesn't take damage and only does a bit each time), but it could be done.  The implications on gameplay would be interesting, but not IMO the best way to limit chop'n'drop.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: PvtHudson on September 13, 2013, 06:48:48 AM
Of course, this change alone is not enough to limit chop'n'drop. Just other means are achievable with existing customization tools, without .exe patching. For example, I always play with chopper chassis reduced to 3 basic speed, and needlejet chassis made several times costlier. All of these ideas (including 'unable to kill land') aren't mine, I dragged them out of Apolyton forum or somewhere else.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on September 13, 2013, 07:07:28 AM
For example, I always play with chopper chassis reduced to 3 basic speed

That's somewhat low early game, and still overpowered late game.  You might want to instead leave it at 8 speed, but make it not get an increase from reactor level.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: PvtHudson on September 13, 2013, 08:08:05 AM
And in accordance with the principle 'counter before the threat' Air Superiority (along with predesigned SAM Rover) is available at Syntetic Fossil Fuels. Cloudbase Academy postponed till Advanced Spaceflight.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on September 13, 2013, 10:43:30 AM
And in accordance with the principle 'counter before the threat' Air Superiority (along with predesigned SAM Rover) is available at Syntetic Fossil Fuels. Cloudbase Academy postponed till Advanced Spaceflight.

That's a good principle; Air Superiority at SFF is something I'd thought of too.  In addition, I'd suggest moving Doctrine:Air Power from requiring SFF and Doctrine:Flexibility to requiring SFF and AMA, so that AAA is also available before it (and it's somewhat later overall.)

Cloudbase Academy at Advanced Spaceflight is an interesting idea; that might be a bit too late, though, so maybe Orbital Spaceflight instead.

Speaking of "counter before threat", I'd move the satellites around so that the orbital defense pod is the one available at Orbital Spaceflight, and the Sky Hydroponics Lab and Nessus Mining Station are the last to become available.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Geo on September 13, 2013, 08:23:50 PM
Speaking of "counter before threat", I'd move the satellites around so that the orbital defense pod is the one available at Orbital Spaceflight, and the Sky Hydroponics Lab and Nessus Mining Station are the last to become available.

Less of a free run for 'busters?  ;)
makes actually sense for the Lab and Station. Presumedly both are massive structures, the latter on some moon or asteroid, and the former needs lots of construction effort and materials, likely provided by those Stations.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Dio on September 13, 2013, 08:26:54 PM
Speaking of "counter before threat", I'd move the satellites around so that the orbital defense pod is the one available at Orbital Spaceflight, and the Sky Hydroponics Lab and Nessus Mining Station are the last to become available.

Less of a free run for 'busters?  ;)
makes actually sense for the Lab and Station. Presumedly both are massive structures, the latter on some moon or asteroid, and the former needs lots of construction effort and materials, likely provided by those Stations.

Also, I think sky hydroponics labs should be called sky farms, because they are called that in the blurb(s) for that facility.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Geo on September 13, 2013, 08:28:49 PM
Also, I think sky hydroponics labs should be called sky farms, because they are called that in the blurb(s) for that facility.

Essentially, both descriptions seem to fit the same thing?  :dunno:
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on September 13, 2013, 09:58:45 PM
Less of a free run for 'busters?  ;)

And makes it a lot harder to keep satellites up in wartime (especially if defense pods are made cheaper than other satellites.)
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: PvtHudson on September 23, 2013, 12:23:25 PM
Yitzi, I have decided to test your approach to sats and started a game as Sven, where ODP and OPT are available at Orbital Spaceflight, NMS at Adv. Spaceflight, and SHL at Self-Aware Machines. Difficulty is transcend. I'm using Scient patch.
Several turns have passed since I have acquired Orbital Spaceflight, built OPT, got monument screen, and Planet's map revealed itself. But when I press F6 (Orbital View, if I remember correctly), it still says "Orbital spaceflight has not been achieved yet". May it be so that check to enable Orbital View is tied to ability to build Sky Hydroponic Labs? Did you run into similar issue?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on September 23, 2013, 04:12:11 PM
I'll look into it; it will probably be fixed in 2.4 or 2.5.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: PvtHudson on September 26, 2013, 07:40:46 AM
On completely unrelated note, how hard it would be to implement small "roleplaying" feature: once a citizen has become transcendi, he or she cannot be downshifted to worker or any other specialist?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on September 29, 2013, 06:08:08 AM
So transcendi cannot be switched?  Probably not so hard to implement...but not really sensible (after all, each "citizen" represents thousands of people, some of whom die and are replaced), and extremely bad for gameplay.  If it gets enough votes once I start taking votes, I can implement it, but it's definitely not making the priority list.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on October 23, 2013, 01:58:13 AM
If you get a chance, how's about looking into the hard-wired special display of the Spartans?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on October 23, 2013, 04:29:20 AM
If you get a chance, how's about looking into the hard-wired special display of the Spartans?

Special display?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on October 23, 2013, 04:38:42 AM
Yah.  They, and only they, get the white-on-black flag display.  It cannot be done in custom factions by filling in the right color boxes, but only through labeling the files Spartan.pcx, etc.  Nobody knows why it had to be that way, or why it's set unmoddable in the .exe - and people have been modding the art for over 14 years now...
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on October 23, 2013, 04:41:54 AM
Yah.  They, and only they, get the white-on-black flag display.  It cannot be done in custom factions by filling in the right color boxes, but only through labeling the files Spartan.pcx, etc.  Nobody knows why it had to be that way, or why it's set unmoddable in the .exe - and people have been modding the art for over 14 years now...

Flag display?

And what happens when you try to fill in those color boxes and don't label it "Spartan"?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Geo on October 23, 2013, 05:28:28 PM
I recall using the spartan color for their equivalent Mars faction in the Mars Scenario. The population numbers of the bases were blacked out ingame.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on October 23, 2013, 05:40:10 PM
Some of it's just not being able to get the white outline on the dots on the minimap...
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on October 23, 2013, 06:56:02 PM
Ah, I see...it's all the graphics stuff due to the fact that their color is black, so text and outlines need to be white instead of black...

Graphics stuff is not generally going to make the short list, but when I finish the short list, I should be able to do something in that regard...it'll end up being based on faction color (i.e. if faction color is darker than a certain amount, then it uses the Spartans' special graphics rules.)

Any idea where the faction color is stored?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on October 23, 2013, 07:57:22 PM
At the bottom of the .pcx in SMAX.  Somewhere in the .exe for SMAC, apparently.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Yitzi on October 23, 2013, 08:20:35 PM
At the bottom of the .pcx in SMAX.  Somewhere in the .exe for SMAC, apparently.

My patch is just SMAX...but if it's in the .pcx then I'll need to investigate and find the proper reference to tell the program, so it'll be quite a task.  (I may ask for help from the graphics modders producing test .pcx's so that I can investigate.)  Still, if enough people want it, it should be doable.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on October 23, 2013, 08:30:23 PM
;b;  You can count on that help.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Mart on December 13, 2014, 07:05:09 PM
What would be the best, is ability to declare a color for the text.
In pcx palette for now, and there is work attempted to get full color - for the future
Maybe then, waiting for full colors would be better, if they are done soon.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on December 13, 2014, 07:20:47 PM
I had to back up a page to see what you where talking about (faction colors and the special case of the Spartans to have white-on-black) but your suggestion makes a lot of sense. ;b;

Plotinus, since this is related to the sort of display issues you're focusing on, please take note.
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Mart on December 13, 2014, 07:38:53 PM
Actually, when you take a look at the bottom of the faction.pcx file, there are several boxes with colors and indication what they are for.
There is "Faction Text Colors" box too. It maybe works for only some texts, but then, it might be not that difficult to enable it.
There are like to boxes for colors. For Spartans, the upper is close to white, the lower is like black. Maybe when the game takes color for Spartans, it points to wrong box?
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Buster's Uncle on December 13, 2014, 07:41:53 PM
I would guess that the way it's set up is some sort of workaround that never got straightened out...
Title: Re: Would anyone be able and willing to take on a mod-enabling project (EXE editing)
Post by: Mart on December 13, 2014, 07:49:03 PM
So an additional box with unit shield text color would be ok, though every faction pcx would need to be corrected (new box color added).
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: 15.

[Show Queries]