[SCRIPT] Improved Races: Chaos Edition v1.09 (25th June)

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

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

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

This is really starting to bug me because it SHOULDN'T be happening...

Mizuchi, Your running ir in a way that ir isnt running at all - hence your not getting the issues.. the problem is within plugn.ir.ship.choose

in order to check if the ship is combat worthy, the ship must be spawned - it is spawned in null, 0,0,0 belonging to enemy race, then deleted not long after

this deletion, the ship is set to rebuild off, but is causing the god engine to go nuts

Code: Select all

    if not size of array $x
      * remove element from array $type at index $temp
      * continue
      $Dirty = [TRUE] 
      $existing.ship = create ship: type=$eval owner={Enemy Race} addto=null x=0 y=0 z=0
      $existing.ship->disable ship rebuild
      $existing.ship->set StartAction enabled to [FALSE]
      $existing.ship->set race logic control enabled to [FALSE]
    end
...
...
...
    if $Dirty 
      $existing.ship->destruct: show no explosion=[TRUE]
    end
I ran my game in seta 10 for 30 mins, and didnt see any of it happening :S
Last edited by Jack08 on Sun, 8. May 11, 11:05, edited 1 time in total.
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV »

something to consider jack

when i've had this type of issue disable ship rebuild didn't seen to be 100% useful, i therefore bound into a sig.killed link script for all spawned ships code that turned them to unknown race, removed homebase and race controlled logic FALSE and dis ship rebuild before they got destroyed

seemed to help
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

LV wrote:something to consider jack

when i've had this type of issue disable ship rebuild didn't seen to be 100% useful, i therefore bound into a sig.killed link script for all spawned ships code that turned them to unknown race, removed homebase and race controlled logic FALSE and dis ship rebuild before they got destroyed

seemed to help
Interesting, thanks for the advice ill try it out now
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

  • Version 1.06
  • Implemented LV's Suggestion (Refrence)
Im going to run the game in seta 10 for an hour, will report back with results

EDIT:
Osiris.. Were you using Enhanced Rewards?
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

  • Version 1.07
  • Fixed a glitch that would cause the Enhanced Rewards system to nullify the homebase of ANY ship that died, therefor confusing the jobs & god engines into respawning that ship with no jobs information (basically, an exponentially growing number of ships directly proportional to the number that died)
X3's Engine is EVIL!
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Jack08 wrote:
  • Version 1.07
  • Fixed a glitch that would cause the Enhanced Rewards system to nullify the homebase of ANY ship that died, therefor confusing the jobs & god engines into respawning that ship with no jobs information (basically, an exponentially growing number of ships directly proportional to the number that died)
X3's Engine is EVIL!
Well Jack08, this certainly has lived up to its name "chaos edition"!
Chestburster2
Posts: 214
Joined: Sat, 25. Mar 06, 13:19
x3tc

Post by Chestburster2 »

Will this also wipe out these additional ships? Or do we have to kill them one by one by one..?^^
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

Chestburster2 wrote:Will this also wipe out these additional ships? Or do we have to kill them one by one by one..?^^
You can use Cycrows cheat package to wipe out all the ships in a target sector: use option "Destroy Sector Menu"

unfortunately because the additional ships have no local variables, its not easy to tell them apart from other ships in the game
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
HotSake
Posts: 472
Joined: Sun, 3. Jan 10, 22:15
x3tc

Post by HotSake »

They're all homebased to a Corp HQ, right? Could whip up a script to destroy all ships homebased to an HQ.
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

HotSake wrote:They're all homebased to a Corp HQ, right? Could whip up a script to destroy all ships homebased to an HQ.
Your right... Also check for the local variable of faction - that way you only destroy the ghost ships

Code: Select all

[THIS]->set local variable: name='faction' value='1'
(from !config.faction.terracorp)
'faction' is always non-null on corporation ships
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
HotSake
Posts: 472
Joined: Sun, 3. Jan 10, 22:15
x3tc

Post by HotSake »

Jack08 wrote:
HotSake wrote:They're all homebased to a Corp HQ, right? Could whip up a script to destroy all ships homebased to an HQ.
Your right... Also check for the local variable of faction - that way you only destroy the ghost ships

Code: Select all

[THIS]->set local variable: name='faction' value='1'
(from !config.faction.terracorp)
'faction' is always non-null on corporation ships
So this script should kill all Corp ships:

Code: Select all

$racesArray = array alloc: size=12
$racesArray[0] = {Argon}
$racesArray[1] = {Boron}
$racesArray[2] = {Split}
$racesArray[3] = {Paranid}
$racesArray[4] = {Teladi}
$racesArray[5] = {Xenon}
$racesArray[6] = {Kha'ak 7}
$racesArray[7] = {Pirates}
$racesArray[8] = {Goner}
$racesArray[9] = {ATF 17}
$racesArray[10] = {Terran}
$racesArray[11] = {Yaki}
 
$j = size of array $racesArray
while $j 
  dec $j =
  $race = $racesArray[$j]
  $shipsArray = get ship array: of race $race class/type={Ship 2004}
  $i = size of array $shipsArray
  while $i 
    dec $i =
    $ship = $shipsArray[$i]
    if not $ship->is invincible
      if $ship->get local variable: name='faction'
        $ship->destruct: show no explosion=[TRUE]
      end
    end
  end
end
return null
edit: download removed, I misunderstood what Jack was saying.
Last edited by HotSake on Sun, 8. May 11, 23:02, edited 1 time in total.
Mizuchi
Posts: 806
Joined: Thu, 10. Feb 11, 05:48

Post by Mizuchi »

As an aside, this made me happy:

[ external image ]

This is exactly what I hoped would happen when we added the Pirate TL to SRM (and pretty much the reason why I asked Paul if I could). :D
Osiris454
Posts: 741
Joined: Tue, 4. Jan 11, 22:03
x3tc

Post by Osiris454 »

Jack08 wrote:
  • Version 1.06
  • Implemented LV's Suggestion (Refrence)
Im going to run the game in seta 10 for an hour, will report back with results

EDIT:
Osiris.. Were you using Enhanced Rewards?
Yeah, I was.
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

@HotSake

Yes, that will kill all corp ships, but not that is the exact opposite of what you want

You want to kill ships that have NO faction variable that have a home base of a corporation HQ

the ghost ships do not have a faction variable, but have a homebase of a corporation hq
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
HotSake
Posts: 472
Joined: Sun, 3. Jan 10, 22:15
x3tc

Post by HotSake »

Oh, ok. I totally misread you.
Osiris454
Posts: 741
Joined: Tue, 4. Jan 11, 22:03
x3tc

Post by Osiris454 »

I am pleased to report that the massive ship spam has stopped. :D
All the spawned ships were destroyed and no more were built to take their place.
HotSake
Posts: 472
Joined: Sun, 3. Jan 10, 22:15
x3tc

Post by HotSake »

This is so frustrating! I altered the script to grab ships homebased to the corp HQs, who did not have the Faction variable set, but the damn script won't save. It says it's saving in-game, but when I open it externally it's exactly the same.
Osiris454
Posts: 741
Joined: Tue, 4. Jan 11, 22:03
x3tc

Post by Osiris454 »

Every time I enter a pirate sector that is being invaded by another race, 3 Pirate Peregrine's enter from each gate, fire their missiles at anything and everything and disappear. Not 'jump out', disappear. They are usually 'IS' for about 10 seconds. It's incredibly annoying. Especially when I'm trying to salvage some ships. I lost a Hyperion to these guys. :cry:

EDIT: On a lighter note, I saw something that made me chuckle a little bit. In the engine's infinite wisdom, it somehow picked an "Small Orbital Weapons Platform" to be a part of an assault team, and I have the pic to prove it. :lol:
User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV »

Osiris454 wrote:"Small Orbital Weapons Platform" to be a part of an assault team, and I have the pic to prove it. :lol:
that would be the code needing a check for get current max speed for a spawned m1, if it's 0 it's an owp ;)
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

LV wrote:
Osiris454 wrote:"Small Orbital Weapons Platform" to be a part of an assault team, and I have the pic to prove it. :lol:
that would be the code needing a check for get current max speed for a spawned m1, if it's 0 it's an owp ;)

Code: Select all

  else if not $eval->get max speed
    remove element from array $type at index $temp
Odd because, its already there...

and its been working fine for ages, Osiris your OwP cant move by any chance can it?
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

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