Did I just win the lottery?

The place to discuss scripting and game modifications for X³: Reunion.

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

Streaks
Posts: 174
Joined: Wed, 16. Aug 06, 09:08
x3

Did I just win the lottery?

Post by Streaks » Tue, 12. Dec 06, 02:50

Tell me you guys, just what happens when one wins the lottery?

I am flying in space, in SETA, and then I get promoted from Petty Financier to Tycoon. That's like more than 5 Trading ranks up. I don't know why I get promoted, all my economic resource can't be the reason:

Ore mine L alpha with Commercial representative.
One Universal Trader.

I get no messages what so ever telling me "Congratulations! You won the Lottery!" or anything like that.

After I get promoted to Tycoon and get my miraclulous 2billion creds, I check my personal info and I see that I bought 13 lottery tickets, and I won 0 lottery jackpots.

Could it be all the scripts I have? I don't like winning like this. Could it be a bug in the X3 v2.02?

User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 » Tue, 12. Dec 06, 03:16

Could be a script conflict or some testing code left in it and forgotten by the script creator.

U can't win the ingame lottery, which btw ought to give you MORE than 2 bil... altho u can't hold more than 2 bil. Last time I bothered the lottery promised 300bil.

Streaks
Posts: 174
Joined: Wed, 16. Aug 06, 09:08
x3

Post by Streaks » Tue, 12. Dec 06, 03:34

Well, if you applied the v2.02 patch, the lottery is winnable.

However, it is not the case with me. It seems that it is a bug. That is why I wanted to go only with the bonus packs (signed scripts) and never go with unsigned scripts.

But I took a chance...God I feel like I caught a disease because I did unsafe sex or something.
Scripts that I have installed:

Advance Mineral Scanner by A dj

Remoter Dock Freight Transfer by BOF

Target Nearert Asteroid by Bunny
Weapons Changer by Bunny

Capture Passengers by Cartel-Inc
Cartel-Inc Shield Hacker by Cartel-Inc

Salvage Insurance Contract by Cycrow

Match Speed by DesertEagle aka Travis Good

Advanced Money Transfer
Attack Target of...
Combat Commands
Group Combat Commands
Group Combat Hotkeys
Group Management System
Group Missile Management System
Jump to Target
Launch Fighter Drone Hotkey
Refuel for Jump
Scout for Enemies
Ship Repair Facility
Station Command Suite
Turret Commands
Waypoint Command
Station Upgrade Framework
Fix Attack command
Fix Trade commands : all by Xai Corporation

signal Targeted by eladan

Race Response Fleets by LV
I also tried twice TFP by siath70 and eladan, but I have uninstalled it on both occassions.

Some of these scripts I have disabled through Cycrow's trusty Enable/Disable function in his Script/Mod Installer.

For the love of me I can't imagine any of these scripts causing this bug. Could anyone give me an educated guess?

User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 » Tue, 12. Dec 06, 04:21

Could be Advanced Money Transfer.

The gain in wealth will cause ur trade rank to increase. A gain of 2bil credits would cause ur trade rank to spike 5 ranks. Thus investigating how u got that 2bil will answer ur problems.

AMT bypasses the 2bil limit in bank accounts rite? So some maths or ware IDs used in that script could be invalidated or re-referenced, causing weird behaviour. AFAIK AMT isn't checked for 2.0.2 safety.

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Tue, 12. Dec 06, 07:23

I'd agree with arcana - Advanced Money Transfer sounds like the best bet. I'd be checking Salvage Insurance Contract as well, just because it's the only other one on the list that plays around with player funds, that I'm aware of.

I'm more concerned about the jump in trade rank. There's no way to script that in, so I think you've got that rank because you sold (or the game thinks you sold) something worth 2 billion or more. It would explain both the rank and fund increase - but what would do that is a mystery...

Streaks
Posts: 174
Joined: Wed, 16. Aug 06, 09:08
x3

Post by Streaks » Tue, 12. Dec 06, 08:49

Well, speaking of salvage insurance, I have just bought 50 insurances from the Goner Temple, despite having Salvage Insurance Contract.

Both my commercial representative and my U-Trader are currently buying things, not selling, when I get promoted with instant 2billion...could it be that some NPC bought all my ore from my Ore Mine L alpha? Even so, that can't amount from 700,000+creds to 2 billion creds...

Will try disabling suggested scripts.

Thank you arcana75 and eladan. :D

Streaks
Posts: 174
Joined: Wed, 16. Aug 06, 09:08
x3

Post by Streaks » Tue, 12. Dec 06, 09:38

Okey, I have tested the bug with arcana and eladan's suggested scripts, and this is the result.

First off, I set out to disable both scripts: Salvage Insurance Contract and Advance Money Transfer using Cycrow's trusty Script/Mod installer.

Seeing that the AMT script was already disabled, I highly suspected that the culprit for my "instant Tycoon with 2 billion creds" bug is from Cycrow's Salvage Insurance Contract script, considering that I just bought 50 insurances from the Goner Temple and all dat.


#0 I have been playing all along with ATM disabled, and SIC enabled.

I disable the Salvage Insurance Contract script and run the game. I still encountered the bug, right on que.


#1 - AMT is already disabled I disable SIC so that both script is disabled. Bug still encountered.

I uninstalled Cycrow's Salvage Insurance Contract, and voila! The bug is gone, or at least I didn't encounter it at the time I shouldv'e.


#2 - SIC uninstalled, ATM disabled. Bug NOT encountered.

But knowing how tricky bugs are, I enable the Advance Money Transfer script by Xai Corp and run the game. Guess what? I encounter the bug right on time.


#3 SIC uninstalled, AMT enabled. Bug encountered.

So, going further, I reinstall Cycrow's Salvage Insurance Contract script and keep it enabled. I disable AMT. Guess what? I don't encounter the bug. What da heck is going on? I'm back in step zero and I don't encounter the bug?!?!?


#4 - SIC reinstalled and left enabled. ATM disabled. Bug NOT encountered. #4 similar to #0.

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Tue, 12. Dec 06, 10:51

Hmm. That's odd... :gruebel:

So you have a save point just before it happens, and it's consistent in when it occurs? That would help enormously, because otherwise, it's sounding fairly random...

If the above is true, I'd try restarting from that save several times to see that it's consistent for each combo. From your last point, it seems it may not be.

User avatar
nirwin
Posts: 2879
Joined: Tue, 1. Nov 05, 23:07
x3tc

Post by nirwin » Tue, 12. Dec 06, 11:02

Scripts that alter money are VERY prone to doing this (in my experience).

I had to write 2 scripts which altered the player account, one worked, the other would jump my account to 2billion (at random). I checked the logic of both scripts and as far as I could see the logic and conditions were the same. Fortunately the non working one was just a cheat script I wrote to help with development of the other.
Seems to me that altering the player account may be a little bugged, bit like the THIS reference.
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Tue, 12. Dec 06, 11:08

@nirwin - Have you seen anything do the trade rank increase? That's the one that's really puzzling me...

Player.
Posts: 3910
Joined: Fri, 8. Jul 05, 08:57
x3tc

Post by Player. » Tue, 12. Dec 06, 11:18

arcana75 wrote:U can't win the ingame lottery
Errm, yes you can :roll:
http://forum.egosoft.com/viewtopic.php?t=183585 - X2 The Threat High Definition Mod - You know you wanna :)

Arseface
Posts: 92
Joined: Fri, 2. Apr 04, 17:18
x3

Post by Arseface » Tue, 12. Dec 06, 11:49

Player. wrote:
arcana75 wrote:U can't win the ingame lottery
Errm, yes you can :roll:
... but not without scripts.

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Tue, 12. Dec 06, 11:55

Arseface wrote:
Player. wrote:
arcana75 wrote:U can't win the ingame lottery
Errm, yes you can :roll:
... but not without scripts.
Umm, actually, I've been reading posts around the forum which suggest the lottery was fixed in 2.0, and *is* now winnable.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22228
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 12. Dec 06, 12:08

yes, the standard lottery is now winnable in bala gi

User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 » Tue, 12. Dec 06, 14:02

Yeah the ingame lottery is indeed winnable, tho I really doubt it's FULLY winnable ie the 300+bil it promises... I've seen those screenshots where 3 or 4 number are matched and payouts are like a few hundred k credits.

Still cool tho.

While we're on the subject of modifying player credits, as an exercise, would it be better to script in item/ware costs based on eg get average price of ware or to key in the exact value? Eg say a 25MW shield as opposed to "85700".

User avatar
nirwin
Posts: 2879
Joined: Tue, 1. Nov 05, 23:07
x3tc

Post by nirwin » Tue, 12. Dec 06, 14:52

eladan wrote:@nirwin - Have you seen anything do the trade rank increase? That's the one that's really puzzling me...
Well no, not really, but when I noticed the credits jumping, I didn't look at my trade rank. I will try running that faulty script tonight (dunno why I keep it around) and see if anything happens to my trade rank. I can't imagine just getting lots of money affects it, but if there is no way to script it up, then I reckon one of those scripts (maybe not one of the ones he's investigating) is doing some pretty extreme behind the scenes trading.

Anyway I'll check it out and let you know.
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

fintoozler
Posts: 228
Joined: Mon, 11. Sep 06, 23:05
x3tc

Post by fintoozler » Tue, 12. Dec 06, 15:00

This sounds a little like an exploit you could use in the old Baldur's Gate 1 which allowed you to make 65000 or potions of any type you liked.

Basically it worked on the principle that if something makes a number go below 0 but it wasn't allowed negatives it would loop to the next allowable number in the direction it was heading i.e +plus or -minus.
In this case minus and being a computer it would simply loop back to the maximum value and keep on counting.

If 2 billion is the maximum amount of money you can have in your account then that suggests somthing may be forcing the program to go below zero credits i.e spending money outside the game's normal parameters as a script would do and the script might be missing/bypassing that little line of code somewhere deep in the game that says "if sum/product=less than zero, then don't do it".

Of couse being a relative programming illterate I could just be talking out my arse.

User avatar
nirwin
Posts: 2879
Joined: Tue, 1. Nov 05, 23:07
x3tc

Post by nirwin » Tue, 12. Dec 06, 15:08

no fintoozler, what you say is pretty spot on. And when I was experiencing this bug that is one of the avenues I explored, I would write out to the logbook, the amount I had in my account, the amount I was adding (negative or positive), what the game thought the result should be, and then my resulting balance.

Neither my maths, nor the games figured on that value coming out less than 0 or anywhere near 2billion.

Weird
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

Streaks
Posts: 174
Joined: Wed, 16. Aug 06, 09:08
x3

Post by Streaks » Tue, 12. Dec 06, 20:15

fintoozler, nirwin, eladan, arcana,

Firstly, thanks for all the input.

fintoozler touched on a very interesting topic.

I am also running Xai Corp's Stationi Command Suite and I am running Price Manager's Match Local Price on my Ore Mine L alpha.

The "Match Local Price scans nearby similar stations and beats their prices by what the player has inputed.
For example, I told my station to beat the lowest price by 5 creds.

I have seen my station price its ore by from 0 creds to -5 creds. I'm thinking to myself, "What? I have to PAY my customers for them to get my ore?!?! Xai, what the heck?"

Could this be the problem? Could a station PAY its customers to get its products? This could also be the reason why my Trading Rank would go up so high in an instant because NPCs buying from your stations increases your Trade Rank, right?

User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 » Wed, 13. Dec 06, 03:07

How does making a product sell for sell than 5 creds end up making the product cost -5cr? Then that product would have to have a minimum price of 0.

No ware ingame has a minimum price of 0, the lowest is 12 (e-cells).

So that's a BIG bug.

I think it's pretty clear from here that you should disable any money-meddling script. With 2.0.2, it's either to make do without the scripts or fire up the SE to make sure the scripts work right. Or follow up in the individual script threads to seek the author for an update.

Post Reply

Return to “X³: Reunion - Scripts and Modding”