[MOD] RS Bribe for Scandata

The place to discuss scripting and game modifications for X4: Foundations.

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

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

[MOD] RS Bribe for Scandata

Post by Reisser » Mon, 20. Mar 23, 17:11

Why spend hours flying around a station when you can politely ask the manager for the data? A bit of money has to flow, the guy has to like you, it also helps if you are well respected by the faction, smaller factories are easier, maybe one or the other personal gift... and chance also plays a role.

The whole thing is not set up as a "cheat", it is by no means easy to get to the data, often simply impossible (ok, you always have a 5% chance). And not for free. In this respect, one will not be spared the departure from stations ... just less often :)

Installation:
https://www.nexusmods.com/x4foundations/mods/1040

Once you speak to a station's manager, you have the additional option of bribing him to get the station's scan data.

Step 1: Get information about his standing, manager personality and station size.

Step 2: Obtain an estimate of the bribe to be spent. Here you can further increase the chance a little by adding up to 3 "gifts".

Step 3: Here it is decided whether the bribery attempt is successful. If you succeed, you have maximum scan data from the station, if you fail, the whole thing varies, depending on how far off you went. Just be surprised.

Step 4: Once you have received the scan data, you leave the station with your spaceship. Once you've undocked, you'll get the promised data.

All important parameters are color coded so that you can quickly get an overview before you run into the open knife.

You see them here:

Image

Remarks:
- the maximum scan data is not necessarily 100%! Ultimate secrets (if they exist) you have to find out for yourself.
- Shipyards, Equipment Docks, Trading Stations, Defense Stations and Headquarters are very difficult to bribe
- you only have one attempt at the manager

Technical:
- Script for 5.1 but there should no problems be with 6.x
- Languages: German, English (you are welcome to do translations)
- I recommend installing ExtendedConversationMenu so that mods using the same dialog (there are quite a few) don't get in each other's way.

History:
- 19.03.2023 1.00 release
Last edited by Reisser on Mon, 20. Mar 23, 18:57, edited 1 time in total.
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: [MOD] RS Bribe for Scandata

Post by Reisser » Mon, 20. Mar 23, 17:13

With a few details I've bitten my teeth and simply found nothing, if necessary someone can help me here.

How do I make the station in question temporarily hostile to the player (and only him)?
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

user1679
Posts: 785
Joined: Fri, 20. Jul 18, 23:20

Re: [MOD] RS Bribe for Scandata

Post by user1679 » Fri, 24. Mar 23, 19:31

Not sure if this will help but here are some entries from libraries\scriptproperties.xml that you could try setting in your MD file:

Code: Select all

    <property name="relationto.{$component}" result="Relation to owner of other component" type="float" />
    <property name="relationto.{$faction}" result="Relation to $faction" type="float" />
    <property name="mayattack.{$component}" result="true if this component has a kill relation towards other component, or has a killmilitary relation and the other component has the purpose 'fight' (can be overridden by fire authorisation override)" type="boolean"/>
    <property name="mayattack.{$faction}" result="true if this component has a kill relation towards the faction (can be overridden by fire authorisation override)" type="boolean"/>
    <property name="ishostileto.{$component}" result="true if mutual object relations and fire authorisations allow either side to attack (see mayattack)" type="boolean"/>
    <property name="ishostileto.{$faction}" result="true if mutual object and faction relations and fire authorisations allow either side to attack (see mayattack)" type="boolean"/>    
and from libraries\common.xsd there are ways to set/get this data

Code: Select all

    <xs:attribute name="relationstate" type="expression" use="optional">
      <xs:annotation>
        <xs:documentation>
          Relation state name (when setting, 'value' must contain a positive integer, 'relation_' prefix recommended)
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] RS Bribe for Scandata

Post by kuertee » Sun, 26. Mar 23, 11:20

you can use <set_relation_boost /> then <reset_relation_boost />.

<set_relation_boost /> triggers <event_player_relation_changed />which has this documentation: "Event for when a faction or an object's control entity changes the relation towards the player (object = entity or null, param = faction or null, param2 = [new relation, old relation], param3 = relationchangereason). NOTE: On permanent faction changes, object is null. On relation boosts, object is non-null, and param is either null (silent boost) or faction.player (non-silent boost). See &lt;set_relation_boost&gt; and &lt;add_relation_boost&gt;."

but do a test. i've not used it myself, so I'm not sure if those are useful for you.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: [MOD] RS Bribe for Scandata

Post by Reisser » Sun, 26. Mar 23, 13:18

Oh thank you both! I'll play around with it a bit and see if I can make the consequences of a completely failed bribe a little more unpleasant :D
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] RS Bribe for Scandata

Post by kuertee » Sun, 26. Mar 23, 15:09

Oh! It didn't click for me that is what you want it for.

You may also want to consider making it a crime in my Crime Has Consequences (CHC) mod - only for players with CHC installed, of course.

From the read-me:

Code: Select all

3rd-party mod API: Custom crimes
================================
1. Register the custom crime:
<do_if value="@md.kuertee_chc.kCHC.exists">
	<do_if value="not $crimeId?">
		<run_actions ref="md.kuertee_chc.CustomCrimes_Add" result="$crimeId" comment="$crimeId = id of the crime">
			<param name="Cue" value="X" comment="X = 3rd-party cue" />
			<param name="Name" value="Y" comment="Y = crime name" />
			<param name="FineLevel" value="Z" comment="Z = fine level. e.g. 'level.easy'" />
		</run_actions>
	</do_if>
</do_if>

2. Charge the player with the custom crime:
<do_if value="@md.kuertee_chc.kCHC.exists">
	<set_value name="$crimeId" exact="X" comment="X is the $crimeId retruned from registring the custom crime" />
	<set_value name="$victim" exact="Y" comment="Y is a ship or station" />
	<set_value name="$isSelfDefense" exact="Z" comment="Z is whether this is crime is in self-defense, an uncharged but recorded crime." />
	<signal_cue_instantly cue="md.kuertee_chc.CrimeConfirm" param="table[
		$crime = $crime_id,
		$criminalShip = if player.ship then player.ship else player.entity,
		$victimShipStation = $victim,
		$victimFaction = $victim.owner,
		$isSelfDefense = $isSelfDefense
	]"/>
</do_if>
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: [MOD] RS Bribe for Scandata

Post by Reisser » Sun, 26. Mar 23, 22:25

Well, I would like to integrate that, but there are definitely a few open points (names, values, are placeholders possible, translations...) . An example script without placeholders would be nice, or a reference script.

You didn't use the routine in your own scripts (I looked at HackingOutcomes).

So I'm just a little overwhelmed to install it on the side without having to go through a lengthy trial and error course again :o But otherwise I'd love to

By the way - this works superp - no reset is needed:

Code: Select all

<set_relation_boost object="event.object.station" value="event.object.station.owner.relation.kill.min" faction="faction.player" silent="true" decay="1" delay="5min"/>
and a little deadlier:

Code: Select all

<set_relation_boost object="event.object.station" value="event.object.station.owner.relation.neutral.min" faction="faction.player" silent="true" decay="1" delay="5min"/>
Last edited by Reisser on Mon, 27. Mar 23, 11:40, edited 1 time in total.
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] RS Bribe for Scandata

Post by kuertee » Mon, 27. Mar 23, 01:45

Check the kCHC_UnpaidLoans cue in kuertee_npc_bank_loans.xml of my NPC Reactions mod. Not repaying the loan on time would result in a custom crime on CHC.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: [MOD] RS Bribe for Scandata

Post by Reisser » Mon, 27. Mar 23, 11:53

So I tried to install it all. After all, the penalty is already taken into account. However, I don't know if this is all correct.

When I query help $CrimeId after registering the CrimeID, I once got a whole value "2" - but now I only get

Code: Select all

 table[$cue=md.BribeForScan.BFS_Stage3_Bribing,$fineLevel=level.easy,$fineMult=1,$id=2,$name='Bestechungsversuch' ]
The penalty will then be taken into account - but no reason "attempted bribery" will be displayed. Just my name, faction and sum.

Here are my calls to the routine:

Code: Select all

		<do_if value="@md.kuertee_chc.kCHC.exists">
			<do_if value="not $crimeId?">
				<run_actions ref="md.kuertee_chc.CustomCrimes_Add" result="$crimeId" comment="$crimeId = id of the crime">
					<param name="Cue" value="md.BribeForScan.BFS_Stage3_Bribing" comment="X = 3rd-party cue" />
					<param name="Name" value="{72734696,3775}" comment="Attempted Bribery" />
					<param name="FineLevel" value="level.easy" comment="120k" />
				</run_actions>				
			</do_if>
		</do_if>

		<show_help custom="'CrimeID: '+ $crimeId " duration="60s" position="0" allowclose="true"/>	


and ...

Code: Select all

    <library name="BFS_Fine">
		<!-- Entweder Abrechnung über eigenen Script oder - wenn installiert - kCHC -->
		<actions>	
			<do_if value="@md.kuertee_chc.kCHC.exists">
			<set_value name="$crimeId" exact="$crimeId" comment="dynamic - will be given above" />
			<set_value name="$victim" exact="event.object.station" comment="Y is a ship or station" />
			<set_value name="$isSelfDefense" exact="false" comment="Z is whether this is crime is in self-defense, an uncharged but recorded crime." />
			<signal_cue_instantly cue="md.kuertee_chc.CrimeConfirm" param="table[
				$crime = $crimeId,
				$criminalShip = if player.ship then player.ship else player.entity,
				$victimShipStation = $victim,
				$victimFaction = $victim.owner,
				$isSelfDefense = $isSelfDefense
			]"/>
			</do_if>
		</actions>
	</library>
You can narrow it down a bit later - but it should work for testing. Just the ID return from the registration is strange.
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] RS Bribe for Scandata

Post by kuertee » Wed, 29. Mar 23, 03:57

The returned table data is correct. My documentation is wrong. I've updated the documentation in the read-me.
So ... I changed one thing in both those blocks of code.

In the first block of code, I changed $crimeId to $crime_bribery.

Code: Select all

<do_if value="@md.kuertee_chc.kCHC.exists">
	<do_if value="not $crime_bribery?">
		<run_actions ref="md.kuertee_chc.CustomCrimes_Add" result="$crime_bribery" comment="$crime_bribery.$id = id of the crime">
			<param name="Cue" value="md.BribeForScan.BFS_Stage3_Bribing" comment="X = 3rd-party cue" />
			<param name="Name" value="{72734696,3775}" comment="Attempted Bribery" />
			<param name="FineLevel" value="level.easy" comment="120k" />
		</run_actions>				
	</do_if>
</do_if>
In the second block of code, I changed $crimeId to $crime_bribery.$id.

Code: Select all

<library name="BFS_Fine">
	<!-- Entweder Abrechnung über eigenen Script oder - wenn installiert - kCHC -->
	<actions>	
		<do_if value="@md.kuertee_chc.kCHC.exists">
		<set_value name="$crimeId" exact="$crime_bribery.$crimeId" comment="dynamic - will be given above" />
		<set_value name="$victim" exact="event.object.station" comment="Y is a ship or station" />
		<set_value name="$isSelfDefense" exact="false" comment="Z is whether this is crime is in self-defense, an uncharged but recorded crime." />
		<signal_cue_instantly cue="md.kuertee_chc.CrimeConfirm" param="table[
			$crime = $crimeId,
			$criminalShip = if player.ship then player.ship else player.entity,
			$victimShipStation = $victim,
			$victimFaction = $victim.owner,
			$isSelfDefense = $isSelfDefense
		]"/>
		</do_if>
	</actions>
</library>
I tested it in a triggered cue (i.e. not by going through the actual bribe process) and it works! But you may have to still check it for scoping and syntax issues.

Thanks for considering supporting my mod, Reisser!
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: [MOD] RS Bribe for Scandata

Post by Reisser » Fri, 31. Mar 23, 17:23

Ok, thanks for looking. I've changed everything, but not much has changed. An amount is still correctly deducted or added to the penalty account, but a reason (Briberyattempt) is still not in the overview. Although I don't even know here: should there be something or not? At the moment only one amount under the faction (here: Free Families) is shown.

Which would be nice for the readme by the way: a breakdown of using FineLevels and their Mult. Very easy for you, for others digging through your mod or try&error :)

In terms of scope: I took out the library as a test and packed both into the same cue (BFS_Stabe3_Bribing)- that doesn't change anything. And the syntax was copied here 1:1 ... but I also checked it (it's 90% copied from you) and I can't find anything there either.

The transfer ID is now:

Code: Select all

table[$cue=md.BribeForScan.BFS_Stage3_Bribing,$fineLevel=level.easy,$fineMult=1,$id=3,$name='bribery attempt']
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] RS Bribe for Scandata

Post by kuertee » Sun, 2. Apr 23, 03:25

Hey Reisser,
(1) I was incorrect in setting the cue to "md.BribeForScan.BFS_Stage3_Bribing". Set the cue to "BFS_Init" instead. This way the $crime_bribery.$id is constant. It changed from 2 to 3 in your last post, which pointed to the fact that my example was wrong somewhere.

(2) Once you "confirm" the crime on the player with "md.kuertee_chc.CrimeConfirm", it should be listed in the "Fines and Forfeiture" menu like the image below. Do you something like this? https://i.imgur.com/Lpexs7h.png

I'll add a sample of fine amounts based on levels in the read-me. Those amounts are taken from the base game's "md.LIB_Reward_Balancing.Reward_Money". A "level.easy" fine relatively equates to a "level.easy" mission reward, etc.
Last edited by Terre on Sun, 2. Apr 23, 06:29, edited 1 time in total.
Reason: Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: [MOD] RS Bribe for Scandata

Post by Reisser » Sun, 2. Apr 23, 12:43

Unfortunately, that doesn't work with BFS_Init either. At the moment I'm calling the CrimeID registration in the same cue that awards the penalty - normally the ID isn't incremented either.

And no, I also have another picture - no "bribery attempt" appears - only an anonymous amount is booked - see here:

[ external image ]

Since I'm slowly pulling my hair out here's the current script. See here: http://ohanaonline.de/mediapool/129/129 ... a.113b.zip

Heck, it's really unpleasantly slow for me to start a thread like this, I'm sure I have some twist in my script, you can't exactly say I'm a professional or even just a better amateur in the job :o
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] RS Bribe for Scandata

Post by kuertee » Sun, 2. Apr 23, 14:30

Ahhh yeah, I was wrong about "BFS_Init". I thought it persists from when the mod is installed. So ... I reckon, create an empty cue to store the crime data in.
The cue needs to persist for the mod's life (from mod install to when the player uninstalled it) at your end, not only to hold the custom crime id and its details, but also so that my mod knows when your end has been uninstalled.
My mod considers your mod to be uninstalled when the cue becomes invalid - when the player uninstalls it.

So ... create an empty like this:

Code: Select all

<cue name="kCHC_Crime" namespace="this" comment="requires Crime Has Consquences mod">
    <actions>
    </actions>
</cue>
Then register the custom crime wherever, but usually JUST before you "confirm" the crime on the player, like this:

Code: Select all

	<do_if value="@md.kuertee_chc.kCHC.exists">
		<do_if value="not kCHC_Crime.$crime_bribery?">
			<run_actions ref="md.kuertee_chc.CustomCrimes_Add" result="kCHC_Crime.$crime_bribery" comment="kCHC_Crime.$crime_bribery.$id = id of the crime">
				<param name="Cue" value="kCHC_Crime" comment="X = 3rd-party cue" />
				<param name="Name" value="{72734696,3775}" comment="Attempted Bribery" />
				<param name="FineLevel" value="level.easy" comment="120k" />
			</run_actions>				
		</do_if>
	</do_if>
Then "confirm" the crime on the player, which adds the fine, like this:

Code: Select all

	<do_if value="@md.kuertee_chc.kCHC.exists">
		<set_value name="$crimeId" exact="kCHC_Crime.$crime_bribery.$id" comment="dynamic - will be given above" />
		<set_value name="$victim" exact="event.object.station" comment="Y is a ship or station" />
		<set_value name="$isSelfDefense" exact="false" comment="Z is whether this is crime is in self-defence, an uncharged but recorded crime." />
		<signal_cue_instantly cue="md.kuertee_chc.CrimeConfirm" param="table[
			$crime = $kCHC_Crime.$crime_bribery.$id,
			$criminalShip = if player.ship then player.ship else player.entity,
			$victimShipStation = $victim,
			$victimFaction = $victim.owner,
			$isSelfDefense = $isSelfDefense
		]"/>
	</do_if>
And, lastly, on your screenshot, can you expand those two entries by clicking on the "+" symbols, please?

EDIT: That file with your current script didn't download for me for some weird reason. I tried twice and also on an Incognito Browser Window. END EDIT.
EDIT 2: Also, I really like your idea for this mod. END EDIT 2.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: [MOD] RS Bribe for Scandata

Post by Reisser » Sun, 2. Apr 23, 14:56

Ok - another downloadlink should do: https://my.hidrive.com/share/n.hsmwn94u

There is also a screenshot. I can open the "Standard Penalties", there is no plus to open on my custom penalties.
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] RS Bribe for Scandata

Post by kuertee » Sun, 2. Apr 23, 15:28

Thanks, got the download. Will test.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] RS Bribe for Scandata

Post by kuertee » Sun, 2. Apr 23, 17:09

I edited your files: https://drive.google.com/file/d/1TjSfBq ... sp=sharing
It should work now. Your should be able to do a diff to see my changes.

But you need the new version of my mod. There were a couple bugs setting fines on the "player.entity".

With new versions of both mods, you'll see:
1. The fine entry on the player in the Fines and Forfeiture menu.
2. Then the fines get transferred to the first owned ship the player enters - which its suppose to do.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: [MOD] RS Bribe for Scandata

Post by Reisser » Thu, 6. Apr 23, 14:28

So, thanks again for your effort. I have taken over everything so far (in the end I was able to take over the whole md file 1:1 for debugging) and now a separate entry is opened as it should be :)

But there is still one problem. I have a ReadText error. The t-files are of course adjusted. The entry is also displayed without any problems in the script (e.g. in the selection menu) - only not for the criminal authorities:

Image

And how is the punishment calculated (I have to bring it into line with my own punishment system). With one faction (FRF 19) I pay 140k with the same mod settings - with the other faction (RAZ 14) then 85k for the same offense.
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] RS Bribe for Scandata

Post by kuertee » Thu, 6. Apr 23, 16:43

Reisser wrote:
Thu, 6. Apr 23, 14:28
So, thanks again for your effort. I have taken over everything so far (in the end I was able to take over the whole md file 1:1 for debugging) and now a separate entry is opened as it should be :)

But there is still one problem. I have a ReadText error. The t-files are of course adjusted. The entry is also displayed without any problems in the script (e.g. in the selection menu) - only not for the criminal authorities:

Image
Cool! That's good news.
For the text reference, ensure that the Name parameter in this group points to the correct text reference. In the previous version that I downloaded from you, "72734696,3775" is "Attempted Bribery". Check the German localisation file because it worked for me in English.

Code: Select all

<run_actions ref="md.kuertee_chc.CustomCrimes_Add" result="kCHC_CustomCrimes.$crime_bribery" comment="kCHC_CustomCrimes.$crime_bribery.$id = id of the crime">
	<param name="Cue" value="kCHC_CustomCrimes" comment="X = 3rd-party cue" />
	<param name="Name" value="{72734696,3775}" comment="Attempted Bribery" />
	<param name="FineLevel" value="level.easy" comment="120k" />
</run_actions>
And how is the punishment calculated (I have to bring it into line with my own punishment system). With one faction (FRF 19) I pay 140k with the same mod settings - with the other faction (RAZ 14) then 85k for the same offense.
Does this answer your question?

Code: Select all

level.trivial = about $75 k
level.veryeasy = about $90 k
level.easy = about $120 k
level.medium = about $800 k
level.hard = about $3 M
level.veryhard = about $30 M
level.impossible = about $100 M
Or ... if you want to know how I get those values, I use the base-game's library functions for calculating reward. Note that Apply_RewardMultiplier will just result in an equal value because signal leak and mission thread bonuses do not apply. I just kept it as reference when I first built the mod two years ago - to remind me that mission rewards are calculated with both the signal_cue_instantly and the include_actions.

Code: Select all

<!-- start: get fine -->
<set_value name="$fines" exact="0" />
<set_value name="$MissionThread" exact="null" />
<set_value name="$OfferType" exact="null" />
<signal_cue_instantly cue="md.LIB_Reward_Balancing.Reward_Money" param="[namespace, $fineLevel, 1, $victimFaction]" comment="basic reward credits"/>
<include_actions ref="md.LIB_Reward_Balancing.Apply_RewardMultiplier" comment="signal leak and mission thread bonus"/>
<set_value name="$fines" exact="$Reward_Money__Result_Multiplied"/>
<!-- end: get fine -->
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: [MOD] RS Bribe for Scandata

Post by Reisser » Thu, 6. Apr 23, 20:12

First of all, thanks for the info - I can start with that.

Then to the problem: I have now taken exactly your revised files and only run the English t-file. Unfortunately, the result is still a readtext error. I also noticed that the logbook entries look a bit strange - isn't there something missing here too?

https://cdn.discordapp.com/attachments/ ... /image.png

Question: I'm still using version v6.0.0004 (I'm still running 5.1). Could it possibly have something to do with that?
Last edited by Terre on Fri, 7. Apr 23, 07:19, edited 1 time in total.
Reason: Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

Post Reply

Return to “X4: Foundations - Scripts and Modding”