; Base Facilities
;
; Name, Cost, Maint, Preq, Free, Effect, (for SPs only) ai-fight, ai-mil, ai-tech, ai-infra, ai-colonize
;
; Name = Name of facility type
; Cost = Construction cost in minerals (x Minerals multiplier in RULES)
; Maint = Maintenance cost in energy per turn
; Preq = Technology prerequisite (see TECHNOLOGY)
; Free = No longer supported.
; Effect= Brief description of effect
; ai-fight=Corresponds with AI 'aggressiveness' setting of -1, 0, or 1
; ai-mil= military value
; ai-tech= advance-of-knowledge value
; ai-infra= infrastructure value
; ai-colonize= colonization value
...
Empty Facility 42, 10, 2, Disable, Disable, Do Not Build Me
...
Empty Secret Project 38, 20, 0, Disable, Disable, End of Real Secret Projects, 0, 0, 2, 2, 2,
...
Hi there can you use the empty base facilities to make faction only facilities?
I've never tried it before thanks.
.exe modding can be used to give them effects a lot more easily than creating entirely new facilities/projects...How difficult would that be?
R.exe modding can be used to give them effects a lot more easily than creating entirely new facilities/projects...How difficult would that be?
Is there a switch command for this? The effects are clearly hardcoded.
Any chance this would be an option for Patch 3.5 or 3.6?
If possible in the near future, it would be good to think of what effects could be added.
Or even more - any chance for creating some "simple parser" which would assign effects based on info in alphax.txt, something like additional digit is after the landmarks in 3.4?
How about more technologies?
Is there a room/possibility in exe to add some more tech slots? Maybe this question was somewhere already. Some techs have their position maybe hardcoded, like Transcendent Thought (?). Some years ago, I remember something about not being able to have more than these 89 tech slots. But maybe this was not right.
===
And maybe I would ask this:
is it, that we have only 89, cause there is a loop, that iterates only 89 times?
how is a tech stored, is it a structure? a c++ class?
I guess SMACX was written in C++, unless it was C?
...So this array is part of the (?) main function, then it is created as a part of stack memory? and then other variables of the stack, created 'after' by main function, would need change of (?) reference address to them (?)
It was written in C++, but it's stored as an array, and adding to arrays in assembly gets difficult. A loop would be easy to change; it's the array that makes it tough.
...So this array is part of the (?) main function, then it is created as a part of stack memory? and then other variables of the stack, created 'after' by main function, would need change of (?) reference address to them (?)
It was written in C++, but it's stored as an array, and adding to arrays in assembly gets difficult. A loop would be easy to change; it's the array that makes it tough.
and this is difficult - like making sure, that everywhere in the code there is no mistake in this?
I do not know enough about compiled c++ programs. Not sure, which way is easier.
There are 9 fields, that are shortly described, with my guess of variable:
Name, text - string? declared length?
id, text too, short name, declared length?
ai-mil, positive integer
ai-tech, positive integer
ai-infra, positive integer
ai-colonize, positive integer
preq(1), text, short name, declared length?
preq(2), text, short name, declared length?
flags - bits, but 9 of them...
ai-xxx, could be set to unsigned char (should be 1-byte, afaik), if they are not that. And maybe regular int of length 4-bytes.
Flags... if SMACX can use std::bitset, would use only 9 bits per new tech.
Pointers, so if SMACX is 32-bit app. (I guess), are pointers always 4 byte long? Or, if someone uses 64-bit operating system, the application (SMACX) makes 8 byte pointers?
Name, pointer
id, pointer
ai-mil, 1 byte (from 4)
ai-tech, 1 byte (from 4)
ai-infra, 1 byte (from 4)
ai-colonize, 1 byte (from 4)
preq(1), 1 byte, signed char?
preq(2), 1 byte, signed char?
flags - bits, 9-16 bits, don't know present length.
Roughly, present bytes per tech: 6x4 + 2 + 2 = 28 bytes
So we get 12 bytes extra from a tech. 1068/28 = 38.14 new techs.
89+38 = 127 techs total.
Is maximum of signed char/integer 127 ? Then we may have the max here.
What about this unlucky signed char.
Let's say we shift values by +2, we make it unsigned char. Then we operate in range 0 to 255.
0 - disabled
1 - none
2 - our first tech in the list
What would need to be changed in the code?
Array indexing... big problem
Any chance we can get a c++ class to offset this indexing by 2?
...but changing all the references still means it's not trivial.You mean references to the array data only?
In this case, with no extension of memory allocated for technology array, we get:
89*44/24 = 163.17
163 technologies....but changing all the references still means it's not trivial.You mean references to the array data only?
With extension of memory for the array, reference change would be needed for everything "after" the array. Meaning even much more work?
163 technologies.:o
SMACX can be enhanced in so many ways, but in order to have something significant, like expanding gamepley experience, these would be on the top of the list, I think:
- more technologies
- more facilities, with more effects, also optionally more than 64 of them (though now, there seem to 69 slots).
- more SP, like facilities, new effects, optionally more than 64. (now 64 slots), but needs to be checked.
- more chassis types
- more move domains: combined/selective like: "ocean shelf and flat terrain only" for true hooverboats, etc.
- play with more than 7 factions.
It looks like something for AC2 (that Firaxis or other company may want to make someday) or simply a clone game, like in public domain, or game with mod of SMACX (for the rights issue).- play with more than 7 factions.
That would be extremely difficult.