[Mod] Info Broker (alpha - update 26.12.13)

The place to discuss scripting and game modifications for X Rebirth.

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

User avatar
Baconnaise
Posts: 764
Joined: Sat, 23. Nov 13, 15:50
x4

Post by Baconnaise »

This is going to be awesome.
Gabryel
Posts: 38
Joined: Mon, 1. Jul 13, 21:30
xr

Post by Gabryel »

Does the info broker keep you permanently up to date or is just one time scanning?
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Gabryel wrote:Does the info broker keep you permanently up to date or is just one time scanning?
permanently. until removed. seems i have to rewrite some sentences in the Manual to make that point clear. (an Option for a cheaper one-time-update is planned though)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
coconutz55
Posts: 18
Joined: Fri, 16. Dec 11, 13:40
x4

Post by coconutz55 »

Thank you for this mod, it is exactly what I was looking for : permanent trade offer info using a NPC (without NPC, I would feel like a cheater).

For me the main problem isn't the scanning issue, that is the property menu.
Could you modify the info brokers ships so that they don't show on the property menu ?
I have a small fleet at the moment but a whole bunch of info brokers (100% lookout alpha, 50% inner world)
Find my fleet (taranis + light sul + 2 balor + Rahanas) in the property menu is now a mini game :lol:
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

small update:

-> the Ships wont appear in the property menu anymore and in the Sector Map only if you expand the Station.
-> added the forgotten check if current Object is in player posession (so it was possible to start this Script on a player object which may have blocked the script wich is intended to start in this situation)

How to Update:
- Drop new files over the old ones
-> Update mandatory if you want to use the next version without previous de-installation, i will keep update-compatibility only for the previous Version.
-> Ships will disappear from the Property List after they completed their current cycle, so be patient with that. (new Broker Ships will "disappear" after a few seconds)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
User avatar
mattek1979
Posts: 133
Joined: Fri, 7. Oct 11, 14:13
x4

Post by mattek1979 »

What do you mean by having a headquarter? I heven't found such a thing i XR
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

well, it is under "planned" features for a reason :roll:
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
belthorne
Posts: 14
Joined: Mon, 12. Sep 11, 22:34
x4

Post by belthorne »

I'm using this, and it's looking good.

But I'm not seeing any "Wares Sold By Stations" showing up, only "Wares Bought by stations".
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

it shoudnt make any diffrence because they are handled in the same way - if one of them works the other should work, too (additionally i have tested this functionality myself and it always added both):

Code: Select all

     <!-- Create List of all possible Things to be Discovered (merged in one List; type will be sorted out when chosen) -->
      <find_buy_offer buyer="this.station" multiple="true" knowntoplayer="false" result="$Scannables"/>
      <find_sell_offer seller="this.station" multiple="true" knowntoplayer="false" result="$tmp"/>
      <!-- merge the two previous Lists -->
      <do_all exact="$tmp.count" counter="$i">
        <append_to_list exact="$tmp.{$i}" name="$Scannables"/>
      </do_all>
....
      <do_all exact="$Scannables.count" counter="$i">
        <set_value name="$Scan" exact="$Scannables.{$i}"/>
        
        <!-- $Scan is a Trade Offer - Add to $NPCShip to make available -->
        <do_if value="typeof $Scan == datatype.trade">
          <add_trade_offer object="$NPCShip" tradeoffer="$Scan"/>
          <show_notification caption="'Info Broker NPC Trade:'" details="[ $Scan.ware , $Scan.amount , $Scan.price , $Scan.unitprice , $Scan.owner ]" timeout="3s"/>
          <wait exact="10s"/>
        </do_if>
....
do the Stations Sell anything? if the Economy ran dry and the Stations really have no Offers this Extension wont add any, it only makes existing ones known.

PS and since i am already answering here:
big/small announcement: i am currently re-writing/moving around the Code to make the whole thing more natural, meaning in the next Version the Broker will wander around in the Station. the "problem" with the Scanner is still unresolved (didnt find out how to use another then the Playership so i gave up for the moment to get my head free) but i eliminated the annoying Update sound. (and the Trade Updates will be handled a diffrent, too - initial list will take longer to be complete, but new trades will probably be added faster) - and even though its a major rewrite i think i can keep drop-in update compatibility)


PS2 and now i just saw i left some Debug Code in there :oops: will not be shown in the next version since i handle this diffrent now.
Last edited by UniTrader on Thu, 26. Dec 13, 00:02, edited 1 time in total.
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
User avatar
YorrickVander
Posts: 2767
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

I don't think you could use another scanner, as to add the offer to the trade window, it has to be via the player ship scanner. Good news on a patch for the sound though. it gets a little much :)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Update Live

its basically a complete re-write to add the "walk around on station"-behavior.

read the readme included.

*will now update OP Post*
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
belthorne
Posts: 14
Joined: Mon, 12. Sep 11, 22:34
x4

Post by belthorne »

I've installed the new version, and it looks good. Except that all the info brokers ships are now copies of the "Albion Skunk", so I currently have three Albion Skunk's listed in the sector.

I can also fly over and see a "Albion Skunk" sitting on a landing pad.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

those are.. just cheap chinese copies of your envious employees..


will perhaps be changed in the future, i just needed some ship where i knew it has working Scanners for the experiments regarding using other ships than the player.primaryship as Scanning Ship.. sadly it didnt work and i forgot to change it back.. it will remain this way for now.. if it really disturbs you you can swap the macro Attribute with the commented out group attribute somewhere in the beginning of the infobroker.ai to use the masstraffic ships again... it will only work when restarting the script though.. (explained clean update procedure should do the trick)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Deleted User

Post by Deleted User »

thanks for the effort :D
User avatar
nonnex
Posts: 366
Joined: Wed, 28. Aug 13, 12:42
x4

Post by nonnex »

as a sideeffect of my works I can give you a solution for letting a hired NPC on station without the need of boarding.

Example: /md/NPC_engineer.xml:

Code: Select all

<diff xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
	<!-- Prevention for "rehiring" -->
	<replace sel="//cue[@name='DefaultComm']/actions/do_else/do_if[@value='not $actor.iscontrolentity']/@value">(not $actor.iscontrolentity) and (not $actor.isplayerowned)</replace>
	
	<!-- Jump into right section and prevention to replace our own engineer on primaryship (if there is one assigned) -->
	<replace sel="//do_elseif[@value='player.primaryship.numfreeactorslots ge 1']/add_player_choice_sub/@section">cEngineer_hasengineer</replace>
	
	<!-- Menucommand, I've hijacked "Work somewhere else..." here but you can create your own submenu of course important is that you jump into section="cEngineer_transfer" -->
	<replace sel="//do_if[@value = 'player.primaryship.numfreeactorslots']">
		<add_player_choice text="{1002,3008}" section="cEngineer_transfer" position="left" choiceparam="[0, 0, $actor, $fee, 'store']" comment="Work somewhere else for me."/>
	</replace>

	<!-- Don't play the boarding scene when "hire and store", because the NPC will stay on Station after hire -->
	<replace sel="//cue[@name = 'OnHired']/actions/play_cutscene">
		<do_if value="(event.param != 'cEngineer_hireandstore')">
			<play_cutscene key="'EnterPlayerShip'">
				<param name="npcref" object="$actor" />
			</play_cutscene>
		</do_if>
	</replace>
	
	<!-- OnHired event and don't assign the engineer to our ship, because npc will stay on station! -->
	<add sel="//cue[@name = 'OnHired']/actions/do_else" pos="before">
		<do_elseif value="(event.param == 'cEngineer_hireandstore')">
			<!-- debug --><show_help custom="$actor.knownname+' is under your command now (OneRingToRuleEmAll)'" force="true" />
			<!-- Here is the place for other commands/aiscript calls whatever after hired -->
		</do_elseif>
	</add>

</diff>
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

thx, will have a look.. is one of my next steps anyway to give it a proper NPC rather than a quick hack to somehow execute it ^^
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
lethal_d0se
Posts: 26
Joined: Wed, 7. Dec 05, 20:22
x3tc

Post by lethal_d0se »

Loving this extension, my only grip is that the scanner tone and overlay appears frequently. I do however, have a hired member of staff on most stations though.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Scanner Tone has been removed in the latest Version because i agree its annoying (Overlay and new enty in encyclopedia still remain though), sadly there is currently no possibility to use another Scanner..
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
boldhedgehog
Posts: 11
Joined: Sat, 30. Nov 13, 14:05

Post by boldhedgehog »

I'd like to see this mod like this:

1. Talk to the station manager and select option: hire agent.
2. This will spawn a pilot, hire him and assign to the station.
3. A check whether a pilot is already hired on a station.
lsd1988
Posts: 6
Joined: Tue, 3. Dec 13, 05:43

Post by lsd1988 »

boldhedgehog wrote:I'd like to see this mod like this:

1. Talk to the station manager and select option: hire agent.
2. This will spawn a pilot, hire him and assign to the station.
3. A check whether a pilot is already hired on a station.
i love this idea.

so if i hire a pilot on any station(that not mine or what?) it will spawn a ship that will do what exactly?

sorry for bad english.
SR

Return to “X Rebirth - Scripts and Modding”