Avorion

Avorion

Not enough ratings
[2.5.2+] Xavorion: eXtended Scripting Framework
   
Award
Favorite
Favorited
Unfavorite
Mods: Mod
File Size
Posted
Updated
1.260 MB
15 Jan, 2023 @ 4:50am
11 Jul @ 8:08am
37 Change Notes ( view )

Subscribe to download
[2.5.2+] Xavorion: eXtended Scripting Framework

In 3 collections by LM13
[2.5.2+] Avorion eXtended
27 items
eXtended Scripting Framework - Library collection
13 items
[2.5.2+] Xavorion: eXtended Gameplay Preset
38 items
Description
XSF is a core part for Xavorion gameplay overhaul, but also a modding toolset for those who wish to use it.

It's main purpose is to add support for more advanced gameplay changes and control over some internal systems that were not available, or just hard to touch.
Some parts are not finished, while other provide more personal QoL tools specific for Xavorion development.


eXtended Scripting Framework
This is a framework module, supporting Xavorion features.
It does nothing by itself.


(Some) Code features

ShipXAI - extended state machine

Script side extension to AI State Machine, allowing for new AI states to be added and extend or override vanilla states.
Plugins are supported, and communication between plugins and entities via Event System is available.


SystemUpgrade - extended ship upgrade framework

GalaxyGenerator - extended generation properties

DevCommands - extended command line tools

Other tools, libraries, and code stuff...


Main Mod Page
For more information, check "Xavorion: eXtended Avorion" link below.
https://steamproxy.net/sharedfiles/filedetails/?id=2923179923

17 Comments
LM13  [author] 23 Jun @ 11:42am 
@SuperWhiteGuy

Thanks :) Still, took longer than I expected.
Hope there are no new bugs this time.
SuperWhiteGuy 23 Jun @ 11:16am 
Thank you for your swift updates. It was a little disappointing when it broke on me after the game updated. Big fan of your work here.:steamthumbsup:
[uRxP]DrChocolate 27 Feb @ 8:46pm 
@LM13 I'm pretty early in my modding adventures. I haven't identified a specific class from your library that I'd like to use yet, nor anything I could contribute to your code, so I won't push you to publish this any time soon. I expect that as I start to work on integrating my functionalities with Xavorion, I'll identify cool things from this library that I'd like to use and possibly extend.

One thing I see already that I'll probably use, but might have to adapt on my end a bit, is your Plugin system (e.g. XAIComponent). It's amusing to be once again approaching an entity logic plugin system in a space game, when I did the same thing 8 years ago for Space Engineers - https://github.com/zrisher/SEGarden/blob/master/Logic/UpdateManager.cs .

This is a much better game, and a better modding environment, so I'm excited.

Thanks again!
은신헌터 21 Feb @ 1:26am 
Thank you for your reply and hard work.
LM13  [author] 21 Feb @ 1:13am 
@은신헌터

I'll make a separate mod after Class Upgrades gets released, to allow randomized shops with restock mod. It will be added to "Optional Tweaks" collection at main mod page - as all other XT series tweaks.

There were others asking for that too, so It's probably best for me to do it.
은신헌터 20 Feb @ 7:48am 
Thank you for your response.
I have 2 questions

First one.
Can you tell me the exact meaning of replace _EntityiIDString with shop seed string?

local _EntityIDString = Entity().id.string
local _SeedString = _EntityIDString .. "CargoUpgrades"

I replaced the _EntityIDString in these two lines with the shop seed string, but the tab for that item in the shop disappeared.

Do I need to find and enter the value of the shop seed string instead of just typing "shop seed string"?

If so, how do I get that value?
I looked in [shop.lua] in [\Avorion\data\scripts\lib] but couldn't find anything relevant.

Secondly.
If I replace it with shop seed string, will the shop items become 'completely random' by any chance?
I'm a big fan of the segmentation of equipment for sale by station, like mining related equipment at the materials station and repair equipment at the repair station.
However, it would be a bit disappointing if this resulted in completely different equipment.
LM13  [author] 20 Feb @ 5:33am 
@은신헌터

Extended shops have station-uniqe selection of items, it's not random. Rift shops are unchanged and should work.

It can be modded, but requires modification of all extended shop files:

Xavorion-SectorGenerator/data/scripts/Merchant/*

in function .shop:addItems()

there a stable random init:

local _EntityIDString = Entity().id.string
local _X, _Y = Sector():getCoordinates()
local _SeedString = _EntityIDString .. "CargoUpgrades"
local _Seed = IGalaxy.GetSectorSeedForProperty( _X, _Y, _SeedString )

-- Stable random - make all shops offer same wares, always
local _Generator = UpgradeGenerator( _Seed )
local _RNG = IGalaxy.GetSectorSeededRNG( _X, _Y, _SeedString )


All you need to do is replace _EntityiIDString with shop seed string ( which is rolled by Shop Restock mod if I remember correctly ).

New Class Upgrades module will modify ALL of those shops really soon btw.
LM13  [author] 20 Feb @ 5:22am 
@DrChocolate

Thanks, glad anyone was crazy enough to look at the code ;D

I've only considered publishing on git. There wasn't much reason for it so all I have is local repository for personal use.

I could post it at some point, but that would take some time and cleaning up.

That error in logs is a typo - missing include path in AI plugin. Fix will be pushed with new update soon.

File in question seems to be "BasicAI.lua" with missing line

package.path = package.path .. ";data/scripts/Config/?.lua"
은신헌터 20 Feb @ 5:10am 
I want to use Shop Restock mod, but it is not compatible with this mod.
Pressing Restock will only change the grade and material of the equipment in the discount item.

However, vanilla stores have restock operations, such as vendors and Rift-affiliated stations.

Therefore, I would like to modify Shop Restock mod, but I would like to know what difference is there between store stations and vanilla in this mod, so that they are incompatible.
[uRxP]DrChocolate 20 Feb @ 5:02am 
@LM13 I've finally started looking into Avorion modding, and I'm so glad to see a lot of excellent utilities in this workshop item. In my experience, this is the most fully-featured utility library out there right now. A couple questions:

* Do you have this posted on github somewhere? We can review the code locally, but if I wanted to discuss it or raise a PR, it would be nice to have it somewhere the community can contribute.

* It seems from the description that this is intended to stand on its own, but if I run this item without 2923179923 I get the following error spammed in the logs: https://pastebin.com/QB9PDf70