Dev's Limit Breaking 101 Techniques
-
Oops, I left out a byte; fixed the original post.
The unknown value looks to be the minimum in stock - retrieved by pub::Market::GetMinInventory as part of a function in content.dll. That function suggests a dynamic economy was planned, but not fully implemented.
For those unaware of it, bases also have a “price_variance = float” value as part of [BaseInfo]. It picks a random number between (1 - price_variance) and (1 + price_variance) to adjust the cost of each good (equipment and commodities).
That section also contains “ship_repair_cost = float” (default 0.33). This affects the repair value of the ship and its groups, but not equipment. The formula is: repair_cost = (1 - damage) * hit_pts * ship_repair_cost. Damage is the fractional health value (75/100 = 0.75).
-
That’s 100% correct. This price randomizer feature was something Cold Void came across a few years back and only seems to work in SP. I played around with this and it works wonderfully in SP but not in MP as it causes crashes. I wrote a little tutorial explaining the functions of this a while back as well but can’t find it on here so here it is again for those interested.
The example here is for the Battleship Missouri. You need to add the variance line to every base to see it work properly.
This code needs to go into you base ini files. DATA\UNIVERSE\SYSTEMS\LI01\BASES
[BaseInfo]
nickname = Li01_03_Base
start_room = Deck
price_variance = 0.001[Room]
nickname = Bar
file = Universe\Systems\Li01\Bases\Rooms\Li01_03_Bar.ini[Room]
nickname = Deck
file = Universe\Systems\Li01\Bases\Rooms\Li01_03_Deck.iniWhat this does is vary the prices of any commodity, weapon or ship sold on a base each time you land. The lowest number you can have is 0.001. I’ve been messing around using 0.1 giving varying prices of between 10 and 1000+ per item depending on initial commodity price. In mods that have high prices for items i’d keep the variance a lot lower.
While not a totally dynamic economy, as it is not dependant on other items being present to affect the price, as in say X3, it gives the impression of a working dynamic economy and is a vast improvement over the pricing structure in the original game.
Here are some number variables and their meaning
price_variance = 0.001 - gives a 0.1% difference in price
price_variance = 0.01 - gives a 1% difference in price (not the most realistic but no abuse)
price_variance = 0.1 - gives a 10% difference in price (most realistic and open to abuse)There is room for abuse by players here with people no doubt docking and undocking to try and get a better price so try to keep the variance number reasonably low. I personally wouldn’t use anything bigger than 0.01 (1%) but i will be experimenting with this to try different values.
-
… but not in MP as it causes crashes…
Can’t confirm, it causes crashes,
but player who sell or buy stuff on such a base,
will have a very high chance to get banned,
cause server + client won’t have the same price. -
d8aaf in content.dll v1.1 1400i - distance from the disrupted tlr that tradelaneattackers are created.
d3d93 in content.dll v1.1 4000f - distance from the last tradelane ring that patrol path npcs created when you enter tradelane will still exist.
A little explanation: once you enter tradelane freelancer immediately generates npcs in the zones that the last tradelane ring(of the direction you travel to) falls into or is within a 2000f( in content.dll v1.1 0xBB1DA) distance. They will persist until you leave tradelane.
If patrol_path encounters are generated further than 4000(if formations are edited for example), they will not exist until you change this offset.
set your scanner range and MP npc detection distance to 100k and you’ll see what I am talking about.11bb58 in content.dll v1.1 1200f - distance from the last tradelane ring that patrol path npcs are created. 2750 and more - no npcs are created
A request: there is a short period of time that npcs that are beyond max npc persistance range will still exist, looks like it’s 3 seconds, anybody could find it??
-
When you get the respawn screen you see the message “You are dead, better luck next time”.
I’ve tried using a hex editor to search the exe and dlls for this string in order to modify it but I’m not seeing anything. Has anyone come up with the location of this string?
R
-
It’s in resources.dll as a UNICODE string…
0x00015516 -
um… FLdev?..
Takes the pain outa Resource.dll rewriting
-
I have resource source files (687k) for these DLLs. Even if you can’t compile them, at least they’re in plain text, for easy searching. They’re JFLP versions, though, slightly different to the originals.
-
Reshacker it is. That worked perfect.
Thanks,
R -
For reference, FLDev automatically loads resources.dll and allows you to search through all DLLs for any keyword.
shameless plug
-
I’ll check it out.
R
-
2500f in content.dll, v1.1 0xC48D7 = Distance that patrol_path behavior npcs spawn when players are close(so far seems like closer than 300m) to each other in patrol path.
There is also some kind of spawn distance transition when switching patrol spawn offsets.
-
FriendlyFire wrote:
For reference, FLDev automatically loads resources.dll and allows you to search through all DLLs for any keyword.FF:- Still waiting on your single-core implementation, if you remember it takes ages to load the resources. I can’t afford a new pc just for FLDev!!
-
You can still use the older single-core version for DLL stuff; I know it’s not ideal but it’s better than nothing I guess…
-
Nope, I want you to give me a working version of your new one!