[TOOL] Changeling - X3:TC Editor and Change Manager [v2.8.1 - Sa-07-May-2011]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Varek Raith wrote:
Roger L.S. Griffiths wrote:
Antick952 wrote:Yep that fixed it..altered the Tships to give them PAC as well and they all now spawn with PAC's. Thanks for all your patience :)
Your welcome, it si not a solution but a work-around, will try and find out why it refuses to spawn IREs.
An update on my tests.
If I use EES with your AWRM, it spawns weapons perfectly on all ships.
If I use EES with CMOD, it doesn't.
It doesn't seem to like IREs for some reason.
:?
Yes, it is a weird one which will take a little time to track down, it is on my high priority list (but I have an important presentation to prepare for next week). In the meantime you have three options to workaround the IRE issue:-
  1. Use EES with AWRM (with or without CMOD - CMOD R7 patch is only missing IonD update)
  2. Patch TLasers with a duplicate IRE entry at the end of the TLasers file and update the EES configuration accordingly (not ideal as it may cause even capitals to spawn with IREs if they do not use EES)
  3. Patch TShips/TCockpits so that IRE only cockpits/ships can use at least one other weapon (e.g. PAC).
Bear in mind that all of the above are notionally temporary solutions till I can bottom out the IRE spawning issue.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Status Update
Information regarding pending v2.9 release of Changeling.

Main changes will be:-
  • Added support for in-memory caching of edited/created resource files
  • "cached" resource files will now be saved/loaded as part of the session file
  • Export functionality will write the changed files
  • Basic ZIPed mod Import/Export support
The next release wll be the first release that will be suitable for testing the export game data functionality. Will try to include as much editing functionality as possible.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Roger L.S. Griffiths wrote:...Bear in mind that all of the above are notionally temporary solutions till I can bottom out the IRE spawning issue.
Ok, I believe that I have struck gold... There are some issues with MCSI and the reading of text id's with and id of 0. It works and it does not work in the same vein, suffice to say I think I may have a resolution for this in the next 24 hours.

EDIT (06-MAY-2011 @ 22:50): After alot of messing around, I have FINALLY managed to coax EES to spawn IREs. The same issue would have also applied to Mosquito missiles since both have a SubType (TFile index) of 0. The issue is caused by certain MCSI array operations not working properly with numeric 0 values. The solution was to store the actual ware in the priorities list rather than the SubType value.

Due to this, it could well be the case the CWP/IR:CE may encounter a similar issue in the future. My recommendation is to avoid storing SubType numeric data in the config arrays and instead convert them to the relevant Ware and store that instead.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Roger L.S. Griffiths wrote:
Roger L.S. Griffiths wrote:Due to this, it could well be the case the CWP/IR:CE may encounter a similar issue in the future. My recommendation is to avoid storing SubType numeric data in the config arrays and instead convert them to the relevant Ware and store that instead.
Hmm. So you're saying that if 0 is loaded into an array it won't spawn that particular weapon (IRE)? Is this an intermittent issue, or reliably reproducible? There's IREs all over the place in my CWP game, but I'm not sure that excludes CWP from the issue you've found, based on what I understand of the problem.
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Litcube wrote:
Roger L.S. Griffiths wrote:Due to this, it could well be the case the CWP/IR:CE may encounter a similar issue in the future. My recommendation is to avoid storing SubType numeric data in the config arrays and instead convert them to the relevant Ware and store that instead.
Hmm. So you're saying that if 0 is loaded into an array it won't spawn that particular weapon (IRE)? Is this an intermittent issue, or reliably reproducible? There's IREs all over the place in my CWP game, but I'm not sure that excludes CWP from the issue you've found, based on what I understand of the problem.
From what I have found the issue is quite repeatable, and I think the relevant code is common to both CWP and EES as it is where you extract the priority index for each ware.

If the priority is stored and the subtype is used as the index then the problem would not occur since you would not be using the array search functions.

But either way the root cause of the EES IRE spawning problem is effectivly a bug in the Scripting engine that has to be worked-around and other scripters should be wary of this issue.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Hm. Well, I only have one set of data, and I'm not seeing any issues yet, aside from the weapon switching, which you've fixed and I've procrastinated on.

On a different note, you still have legacy code on EES that renders the potential for no shields being spawned on ships with over 20 GJs. Not that it's a likely scenario, just thought I give you a heads up on it again. It's an integer wrap issue.
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Litcube wrote:Hm. Well, I only have one set of data, and I'm not seeing any issues yet, aside from the weapon switching, which you've fixed and I've procrastinated on.

On a different note, you still have legacy code on EES that renders the potential for no shields being spawned on ships with over 20 GJs. Not that it's a likely scenario, just thought I give you a heads up on it again. It's an integer wrap issue.
Actually, I resolved that issue a while ago by re-ordering the equation so it does the divide before it does the multiply.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Status Update
Formal Release of Changeling v2.8.1 and EES v2.5.

Main changes are:-
  • EES Configuration File changed slightly to work-around a bug with MCSI and text entries with an id of 0
  • EES "IRE non-spawning bug" fixed
This intermediate release of Changeling (in support of EES v2.5) includes some of the partially implemented functionality that will be included properly in v2.9 (previous functionality should still work).
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
Antick952
Posts: 20
Joined: Tue, 28. Apr 09, 12:17
x3tc

Post by Antick952 »

Excellent Job the fix works beautifully and I may be mistaken but the new EES setup seems to spawn a wider range of weapon loadouts than the old one (a bonus as far as I'm concerned). So good job all round :)
User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon »

Just had a play with what changeling can do. Once again, it looks amazing. It'll be such a powerful tool when it's done, I can't wait... :D
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Antick952 wrote:Excellent Job the fix works beautifully and I may be mistaken but the new EES setup seems to spawn a wider range of weapon loadouts than the old one (a bonus as far as I'm concerned). So good job all round :)
Thanks, the feedback received helped alot to track down the issue (so thank you to all who helped :)). I hope Egosoft do a better job with the testing of the scripting engine with X-Rebirth :roll:
EDIT: BTW there has been no change to the spawn selection logic. The current behaviour is as originally intended.
EmperorJon wrote:Just had a play with what changeling can do. Once again, it looks amazing. It'll be such a powerful tool when it's done, I can't wait... :D
Thanks :) ... I will try to get v2.9 out ASAP... hopefully in the next week or two.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Status Update
Release package update EES v2.5.0.

Main changes are:-
  • Added missing ReaMe file which includes:-
    • Coverage of CWP compatability measures included with 2.5
    • Updated installation instructions
Please note that if you installed 2.5 in accordance with legacy instructions you will need to move/delete the following two files:-
  • !turret.attacktarget.adv.pck
    !turret.swaptask.adv.pck
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Roger,

Just so I can clear up some confusion I have here, I was wondering if there are any benefits or incompatibilities when using CWP and EES. I would normally just use EES but I recently installed IR:CE and as you are well aware, it comes with CWP. Now, Im perfectly happy just using one or the other but being the content junkie I am, if I can get more by combining the two I will. I just want to know if there is really any point in doing this if both do roughly the same thing.

-joel
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

joelR wrote:Roger,

Just so I can clear up some confusion I have here, I was wondering if there are any benefits or incompatibilities when using CWP and EES. I would normally just use EES but I recently installed IR:CE and as you are well aware, it comes with CWP. Now, Im perfectly happy just using one or the other but being the content junkie I am, if I can get more by combining the two I will. I just want to know if there is really any point in doing this if both do roughly the same thing.

-joel
IR:CE has it's own version of CWP which is ONLY used for IR:CE generated ships, this was done because they wanted to do something unique with the weapon configurations for IR:CE.

As I understand it standalone EES or CWP would still be required for Jobs/OBS powered missions. As of v2.5 of EES, I have modified the base scripts so that anything written for standalone CWP should be compatible with EES.

EES provides better control over weapon and missile spawning than CWP but at the end of the day the choice is yours.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

So if I'm understanding you correctly, because I use IRCE I can not use EES because it does not use a standalone CWP. Am I making sense? And if they are compatible is there a point in haveing both if the do the same thing? I guess I'm unclear on how the two compare. You say EES bas better control over weapon spawning but that doesnt really mean anything to me as I am not a scripter.
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

joelR wrote:So if I'm understanding you correctly, because I use IRCE I can not use EES because it does not use a standalone CWP.
No, I did not say that... IR:CE includes a CWP clone that should be able to co-exist with standalone CWP or EES.

The IR:CE embedded CWP is only used by IR:CE, and not by either Jobs or OBS.

All Jobs file/OBS generated ships will still require either EES or standalone CWP.
joelR wrote:And if they are compatible is there a point in haveing both if the do the same thing? I guess I'm unclear on how the two compare .
CWP basically does one thing... changes the order of selection of the Lasers for ALL races. There is no per-race configuration and no configurable control over missile spawning (as I understand it).

EES on the other hand gives you complete control over what lasers and missiles each race will and will not use (restricted by ship weapon compatability of course) and allows you to control the probability of weapons being selected. For example, this means that you can prevent non-pirate races from using IBLs if you wanted (but still allowing the player to use them on the relevant ships). Or make it so that Boron owned ships only use IonC rather than PPC or IBL. Or make it so that Teladi owned ships will prefer to use ammo based weapons. Or make it so that no AI ship will be able to use WMD class missiles.

In addition EES incorporates configurable bit masks for lasers and missiles so that calling scripts can filter out weapons that would otherwise be available for a race.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Roger,

Thank you. That was very clear.

So one more question then. You say that EES is configurable to do things like prevent non pirate races using IBLs. Is this done by the average user or meant for scripters per se? I assume that this is what changeling is for.

So, as a regular user who typically goes no further than installing the mod or script, is EES then basically a different kind of CWP? In other words, if I just drag and drop EES do I gain anything over CWP or is it a push?

EDIT: I should add that I am using the SRM "unleashed" jobs.
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

joelR wrote:So one more question then. You say that EES is configurable to do things like prevent non pirate races using IBLs. Is this done by the average user or meant for scripters per se? I assume that this is what changeling is for.
Changeling is designed to basically hide as much of the nitty gritty detail of mod creation and merging as humanly possible. It's target audience is primarily the end-user but if everything goes as planned even modders may wish to use it.

Changeling was originally evolved from a tool I generated specifically for editing the configuration for EES in a safe, controlled, and user friendly manner. It has since been expanded upon to also support the generation of MARS 7047 configuration files.

In summary, YES... As an end-user, you could use Changeling to edit the EES configuration files. Modders would probably also use Changeling for this purpose too (as I do for my AWRM configurations for EES)
joelR wrote:So, as a regular user who typically goes no further than installing the mod or script, is EES then basically a different kind of CWP?
Basically, yes ... CWP is the grand-daddy of EES, both of which were originally created by LitCube (EES evolved from CWP).

At some point down the line, I became involved in the continuous improvement of EES and as of v2.1 have taken on the responsibility for the release and further development of EES. As far as I am concerned, EES is LitCube's brain child and my primary interest in EES is from the perspective of providing control over the spawning of lasers/missiles included in new and merged mod material.
joelR wrote:In other words, if I just drag and drop EES do I gain anything over CWP or is it a push?
Yes - EES v2.5 will install over a standalone CWP installation and work as-is (EDIT: providing you follow the instructions in the included readme.txt). Jobs/OBS will benefit fully from EES where as any script that is written for CWP will only benefit partially from EES (better control of laser/missile spawning primarily).

NOTE: EES v2.5 does not affect IR:CE spawned ship loadouts, IR:CE ship loadout configurations are completely independent of EES.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Awesome. Thanks for taking the time to explain this to me. So that settles it. Ill install EES.
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

joelR wrote:Awesome. Thanks for taking the time to explain this to me. So that settles it. Ill install EES.
Your welcome :)

Just bear in mind that Changeling is still in development with respect to mod creation/editing/merging but is fully functional on the EES configuration front. MARS configuration editing/generation is a work in-progress, but it should solve the primary complaint of MARS being unable to use added weapons (c/f AWRM).
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”