Avorion
[2.5.2+] Xavorion: eXtended Avorion
 Este tema se ha marcado como fijo, por lo que probablemente sea importante
LM13  [desarrollador] 25 FEB 2023 a las 3:57
[Scripting] Tweaks & Requests
Xavorion should be easy to tweak with little scripting knowledge.

If there's something specific you're looking for, but can't find it or make it work, feel free to ask.
< >
Mostrando 1-15 de 30 comentarios
LM13  [desarrollador] 25 FEB 2023 a las 3:57 
Resource Depots - Material Selling/Buying
[entity/merchants/resourcetrader.lua]

1. Comment out line 28 to unlock all materials at resource depots

2. To make Resource Depot only buy materials it does not have for increased price:
Replace code from line 117 to 123 with
if GetMaterialFactor(material) > 1.0 then soldGoodButtons[material].active = false boughtGoodButtons[material].active = true elseif GetMaterialFactor(material) > 0.0 then soldGoodButtons[material].active = true boughtGoodButtons[material].active = true else soldGoodButtons[material].active = false boughtGoodButtons[material].active = false end
Blue_Phoenix 25 FEB 2023 a las 20:06 
Thank you
Blue_Phoenix 25 FEB 2023 a las 20:46 
What is the distribution of resources? Does higher tier resources appear more in high tech areas?

"Any part of the galaxy is playable, but risk and rewards increase as you get closer to the barrier."

or completely random up to Avorion beyond the boundary.

What would need to be altered for something closer to vanilla but not exactly? like iron is more common farther from the core but you can still find rare areas of ogonite and xanion with high tech levels.

or is this how it works? Any info would be helpful I might look into how to alter things myself but am unfamiliar with how modding Avorion works.
Última edición por Blue_Phoenix; 25 FEB 2023 a las 20:53
LM13  [desarrollador] 26 FEB 2023 a las 4:57 
@***Blue_Phoenix***

Resource distribution works similiar to what you've described. As of now, there are 2 distribution tables for outside and inside.
I've cut relation between tech levels and materials on purpose, it's not completely random.
There's a new layer of properties for each individual sector, partially hooked into generator, partially into gameplay code.

I'll post which files hold some of the stuff related to galaxy generator,
but that might be too much if you're not familiar with Avorion modding specificially.
LM13  [desarrollador] 26 FEB 2023 a las 5:49 
Resource Distributions
[GalaxyGenerator/Properties/BaseProperties.lua]

Line 61: @SectorProperty.Materials

This class contains two distributions of materials, with simple logic to swap between inside/outside barrier.
Distance and Coordinates are available in Get function, so it should be easy to lerp probabilities to your liking.
Just remember that encoding has to be there as it is in last line.

[GalaxyGenerator/Properties/DistributionProperties.lua]

Line 64: @SectorProperty.MaterialProbability

This class depends on [SectorProperty.Materials], and decides their amount in asteroids, depots, and ships.
Currently there is no logic there, changes are planned with Sectors Module.
AwtismForPresident 8 DIC 2023 a las 11:21 
Is there a way to make all mining and salvaging weapons into the extracting kind ?I am assuming third party mods won't affect this due to the overhaul of mining and salvaging lasers. Also, does this mod change the amount of turrets the modules add, and if so, where can I find the file to give them some more of them, and give them the same amount of auto turrets as turret slots?
LM13  [desarrollador] 8 DIC 2023 a las 11:37 
Publicado originalmente por AwtismForPresident!:
Is there a way to make all mining and salvaging weapons into the extracting kind ?I am assuming third party mods won't affect this due to the overhaul of mining and salvaging lasers. Also, does this mod change the amount of turrets the modules add, and if so, where can I find the file to give them some more of them, and give them the same amount of auto turrets as turret slots?



Xavorion adds new upgrades that give more & equal number of slots - Core Modules found at Repair Docks/Shipyards.

Turret Control Systems are exactly the same as base game, and ca be overridden by workshop cheat mods.


Only way to remove Refiners is to modify Mining module directly.
All right, to edit mining turrets look at:

Mining module:
[2992809036/data/scripts/TurretsDatabase/MiningTurrets.lua]

replace line 41: TechType = WeaponTech.OreRefinerBeam, into: TechType = WeaponTech.OreExtractorBeam, and then for salvaging at line 137: TechType = WeaponTech.ScrapRefinerBeam, into: TechType = WeaponTech.ScrapExtractorBeam,

for both of those you might want to boost efficiency ( since that's what you're looking for by that change I guess )

Efficiency = 0.1,

to 0.3
Última edición por LM13; 8 DIC 2023 a las 11:43
AwtismForPresident 8 DIC 2023 a las 12:33 
OK thanks, I can do some basic code editing, as I have with other mods, although these seem to be built on a different base to others so some guidance will be needed. Edit: Managed the code change, gonna go have a look at the systems and do some editing, but should be fine there.
I am using the 8x turrets mod from the workshop but I noticed its only editing some of the systems, so assumed some are governed by this mod. I will mess around with some of those settings.
Última edición por AwtismForPresident; 8 DIC 2023 a las 12:37
LM13  [desarrollador] 8 DIC 2023 a las 12:39 
Publicado originalmente por AwtismForPresident!:
OK thanks, I can do some basic code editing, as I have with other mods, although these seem to be built on a different base to others so some guidance will be needed. I am using the 8x turrets mod from the workshop but I noticed its only editing some of the systems, so assumed some are governed by this mod. I will mess around with some of those settings.

Yeah, Xavorion uses custom base for... well most stuff. Should be easier though, so feel free to ask.

Only those systems are touched by Xavorion, others are either completely Vanilla, or fully custom:
velocitybypass weaknesssystem fightersquadsystem shieldbooster valuablesdetector
AwtismForPresident 8 DIC 2023 a las 12:51 
The code looks much cleaner than any other mod I have edited in the past, but I have spent some ~20 hours in those mods. Takes some getting used to but not too bad.
Where would the systems be located?
LM13  [desarrollador] 8 DIC 2023 a las 13:02 
Publicado originalmente por AwtismForPresident!:
The code looks much cleaner than any other mod I have edited in the past, but I have spent some ~20 hours in those mods. Takes some getting used to but not too bad.
Where would the systems be located?

Class System / 2992808773 [2992808773/data/scripts/systems] coresubsystem.lua ( Xavorion custom ) enginebooster.lua overchargemodule.lua( Xavorion custom ) velocitybypass.lua weaknesssystem.lua Weaponry / 2992809109 [2992809109/data/scripts/systems] fightersquadsystem.lua shieldbooster.lua

coresubsystem.lua - That's the turret one, interesting stuff starts at line 93

-- @UpgradeType.FighterCore

It's one of 4 variants in single file, it should be easy to modify slots from line 126 to 140, other variants look almost same

-- Int < 1 ; 10 > table.insert( _Properties, { ID = UpgradeProperty.ArmedSlots , Value = _HighInt } ) table.insert( _Properties, { ID = UpgradeProperty.AutoSlots , Value = _HighInt } )
Stalkz 7 ENE 2024 a las 20:27 
Publicado originalmente por LM13:
Resource Depots - Material Selling/Buying
[entity/merchants/resourcetrader.lua]

1. Comment out line 28 to unlock all materials at resource depots

2. To make Resource Depot only buy materials it does not have for increased price:
Replace code from line 117 to 123 with
if GetMaterialFactor(material) > 1.0 then soldGoodButtons[material].active = false boughtGoodButtons[material].active = true elseif GetMaterialFactor(material) > 0.0 then soldGoodButtons[material].active = true boughtGoodButtons[material].active = true else soldGoodButtons[material].active = false boughtGoodButtons[material].active = false end


Hi,

I've commented out Line 28 like you said but only local resources are still able to be sold at the depots.

--
local _X, _Y = Sector():getCoordinates()
local _SectorMaterials = IGalaxy.GetProperty( _X, _Y, SectorProperty.MaterialProbability )

local _Factor = _SectorMaterials[ _Material - 0 ]

_Factor = _Factor or 1.0

-- if _Factor == 0.0 then return 0.0 end

--print( "[ResourceDepot.getBuyingFactor] %d : %d - material(%s) ; factor(%s)", _X, _Y, tostring(_Material), tostring(_Factor) )

-- Pay less for primary sector material
-- 0.5 0.3 0.2
-- Price scales from 20 - 100%, worst case scenario when sector is single material only, they wont pay much for that
_Factor = 0.2 + (1.0 - _Factor) * GalaxyModule.ResourceSellValueFactor
--

return _Factor

end
LM13  [desarrollador] 8 ENE 2024 a las 5:44 
Publicado originalmente por Stalkz:

Hi,

I've commented out Line 28 like you said but only local resources are still able to be sold at the depots.

Hello,

hope that helps:

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3134809180
jivaii 11 ENE 2024 a las 15:05 
I've noticed that my guns like to shoot wrecks/rocks when harvesting them, is that a behaviour that could be changed?
LM13  [desarrollador] 12 ENE 2024 a las 2:08 
Publicado originalmente por jivaii:
I've noticed that my guns like to shoot wrecks/rocks when harvesting them, is that a behaviour that could be changed?

There was a bug like that, I thought it was fixed...

If those turrets were assigned as automatic - attack target, then that's intended behaviour.
Otherwise, it's a bug - I'll check that
< >
Mostrando 1-15 de 30 comentarios
Por página: 1530 50