[Script question]How to change race notoriety?

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

Post Reply
User avatar
Zaitsev
Posts: 2007
Joined: Tue, 2. Dec 08, 01:00
x4

[Script question]How to change race notoriety?

Post by Zaitsev » Sat, 21. May 16, 00:35

Hi.

So, I'm toying with the idea of having my character stranded in an entirely hostile universe, where everyone is my enemy and I have to rely on whatever I have available to get by. I have most of it set up via scripts and mods that are already available, but I need something that will change my starting race to hostile as well. That is, if I start as Terran, I want to change my notoriety to, for example, -333 for Terran (and ATF) after I've set everything up. How do I do this?

Also, since my scripting experience is limited to bumbling my way through a script of about three lines five years ago, please explain like I'm five. :p I can open the script editor and set it up to make a new script, but that's about it.
I'm sorry, I can't hear you over the sound of how awesome I am :D

DiDs:
Eye of the storm Completed
Eye of the storm - book 2 Inactive
Black Sun - Completed
Endgame - Completed

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Sat, 21. May 16, 01:36

1/ When you create a script prefixed by "setup.", this script will automatically be triggered every time you load or start a game. For instance: "setup.Mayhem".

2/

Code: Select all

set notoriety between [Player] and [Terran] to -333 points
set notoriety between [Terran] and [Player] to -333 points
That's the command you need. It's a good habit to make it both ways, even though it's useless for the player.

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Sat, 21. May 16, 03:35

I'm not as knowledgeable as these guys but I remember that the friend/foe status of an NPC ship doesn't just change suddenly because your notoriety has changed but it gets applied when it spawns so some people ran scripts that killed the whole universe so it ships respawns with the right friend/foe status. Also happens for stations I think. But I could be wrong.
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Sat, 21. May 16, 03:54

In LU as of 1.6.2, reaching a new notoriety level with a race changes all a races object FF settings to match the notoriety.

User avatar
Zaitsev
Posts: 2007
Joined: Tue, 2. Dec 08, 01:00
x4

Post by Zaitsev » Sat, 21. May 16, 04:41

Joubarbe wrote:1/ When you create a script prefixed by "setup.", this script will automatically be triggered every time you load or start a game. For instance: "setup.Mayhem".

2/

Code: Select all

set notoriety between [Player] and [Terran] to -333 points
set notoriety between [Terran] and [Player] to -333 points
That's the command you need. It's a good habit to make it both ways, even though it's useless for the player.
Just tested this and it worked like a charm, although I was a bit confused for a sec since Betty didn't tell me I had lost recognition. :p

Anyway, since it means I can now bust my character down from the second highest rank to something that's more fitting for someone who's just been accused of stealing a Kyoto, I'm a very happy camper. Thanks a lot, guys. :thumb_up:
I'm sorry, I can't hear you over the sound of how awesome I am :D

DiDs:
Eye of the storm Completed
Eye of the storm - book 2 Inactive
Black Sun - Completed
Endgame - Completed

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Sat, 21. May 16, 09:45

It gets a little bit more complicated then:

Code: Select all

SetBountyRep:

  $oldRep = $currentRace-> get notoriety title to race [Player]: text=[FALSE]
  $oldRep.raw = get notoriety from race $currentRace to race [Player]
  $newRep.raw = $oldRep.raw + $currentRep
  set notoriety between $currentRace and [Player] to $newRep.raw points
  $newRep = $currentRace-> get notoriety title to race [Player]: text=[FALSE]

  if $oldRep != $newRep
    $t = $currentRace-> get notoriety title to race [Player]: text=[TRUE]
    $t = $currentRace + ': ' + $t
    display subtitle text: text=$t duration=12000 ms
    START speak text: page=13 id=54 priority=10
  end

endsub
id=54 -> "you have gained recognition"
id=55 -> "you have lost recognition"

Post Reply

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