Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Multirez

Pages: [1]
1
Mods / Re: [MOD] System Control v1.01
« on: January 31, 2018, 12:38:53 PM »
... do you think it would be possible to display the total amount of bonuses your ship is receiving because of all the System Module Upgrades?
I think yes! This is possible, and I've added similar tooltip in the last update v1.02.  ;)
Spoiler: show

2
Mods / Re: [MOD] System Control v1.01
« on: January 30, 2018, 07:05:33 PM »
But then a new problem arises: how to properly balance this so that it has valuable counterplay? If someone can have an offensive system like this, or maybe even more than one, we need some way to counteract that, or all combat just devolves into "who can have the most or best Hyperspace Jammers equipped".

I think here must be a type of turrets to keep the enemy, with overheating, so that the player can not jumm the target endlessly, the strength and the range of the jumm can also depend on the turret quality.

And we need a new type of system - warp core stabilizer (or hyperdrive booster etc.), which are made in the form of upgrade modules, the higher the quality of such a module, the more stabilization we obtain, that can be a balanced system.

3
Mods / Re: Why Does the Player Ship not Have AI?
« on: January 30, 2018, 06:40:42 PM »
Oh, really? That's quite awesome. Can you reproduce your bug so we can turn it into a feature?  ;D

I tried to comment out the pilot check in the mine.lua

Spoiler: show
Code: [Select]
function AIMine.updateServer(timeStep)
    local ship = Entity()

    if --[[ship.hasPilot or ]]ship:getCrewMembers(CrewProfessionType.Captain) == 0 then
print("(%s) Stops mine work!"%_T, ship.name)
        terminate()
        return
    end

    -- find an asteroid that can be harvested
    AIMine.updateMining(timeStep)
end

But when I climbed aboard the ship, the AI did not continue to move :(, and only steal shooting from the lasers.

4
Mods / Re: [MOD] System Control v1.01
« on: January 30, 2018, 04:55:38 PM »
Thanks for the flattering reviews, I hoped that the modification would be useful, and tried to make the game more comfortable, saving the player from having to do the same mechanical actions.

Quote
But yeah, you're right, it would probably be best to fix this at some point. If not for balancing, at least for the PvP side of things.

As for PVP, for normal competition in combat in this game there are not enough tools, anyone can escape by simply jumping into another sector, even if you have a fast ship. We need a weapon capable of holding a player from a jump, destroying the possibility of a warp, such as in EVE. Perhaps in the future there will be see similar game mechanics.

In addition, some factories in the game allow you to make a cheat weapons that deals more then 8к damage per second, this is a vanilla game without any modifications. This fact, in my opinion, destroys the gameplay, making a such weapon you just kill everyone with a single click.

And all the same about PVP: with this mod, you can always press Alt + 0 at the last moment, that is removing all modules.

5
Mods / Re: Why Does the Player Ship not Have AI?
« on: January 30, 2018, 02:43:00 AM »
I had such a situation that I added additional comments for the miner, and made a mistake when the miner is terminate on the player enters the ship. It turns out I was getting on the ship, the script gave an error and the AI ​​continued to work, it drives my ship and at the same time it also controlled my guns, it was a specifically controlling the machine, I can fly, but AI try to fly at same time and it was pushing the gun trigger, like players left mouse button.
So it comes out theoretically possible to make it possible for AI to control the ship, in whole or in part, while player onboard.
It may be necessary to do so that he took the place of the co-pilot, and pass it a couple of turrets or disassembly fighters, so that it control fighters work.

6
Mods / [MOD] System Control v1.02
« on: January 29, 2018, 12:49:32 PM »
System Control

The mod allows player to create the templates (sets) of upgrades for ship systems and quickly switch its from
one to another.


Reasons

For sure you had to open the menu of upgrades many times and rearrange the same system upgrades,
especially for me it is relevant in the later stages of the game, when the ship has more than 10 installed
systems. I switch them again and again, not because I got new ones, but because I want to get the most out of
the ship, because I want to be able to shoot from 30-40 guns in combat, because I want to jump by 50 sectors,
because I want to dismantle as quickly as possible, because I want to see more signatures on the map,
carry more cargo, fly with maximum acceleration and so on. I again and again opened the management of systems
and rearranged the same improvements, again and again, and this was the reason for creating this modification.

In addition, if you play in the alliance and fly on the ship of the alliance, then there is one more thin,
it seems to me a flaw, in the fact that when installing and removing systems all the players of the alliance
have info that I added new upgrades to the inventory of the alliance, or deleted cool rare upgrades and these
messages filling the entire right side of the screen, 2-3 players are playing and you do not know when to be
happy that someone added a new upgrade because the right side of the screen is constantly clogged with messages
about systems replacing and you just start ignore them. So I tried to fix this flaw by adding the ability
to use the player's inventory when installing or removing improvements. With the help of specially selected
checkbox you can handle it or SystemControl use the inventory of the ship fraction or the player's inventory
even if the ship belongs to the alliance.

Download

SystemControl_v1.01.zip
  - Fixed issue on system replacement from vanilla UI.

SystemControl_v1.02.zip
  - Added [Info] button that is display the total amount of bonuses your ship
  - Fixed occasional error with getting system data on client.

Installation

1. Download the mod ShipScriptLoader by Dirtyredz and follow its installation instructions.
This is required to load this modification. If you are already using it you may skip this step.

2. Copy the directory mods contained in the SystemControl.zip file directly into the Steam installation
directory folder for Avorion.

3. Open the file Avorion/mods/ShipScriptLoader/config/ShipScriptLoader.lua
Before the last line containing return Config add this code:
Code: [Select]
   Config.Add("mods/SystemControl/scripts/entity/systemcontrol.lua")
How to use

If you installed everything correctly, you should see a system upgrade icon at top-right of the screen.[/size]



Install desired upgrades through the standard interface and press an upgrade icon, its will open
the SystemControl window. The topmost line (1) shows the current systems installed on the ship, the other
lines show your templates saved earlier. [Update](2) button will replace the template by the current
list of upgrades. The [Use](3) button calls the SystemControl to find and install the upgrades according
the tamplate. Search will be made in the player's inventory or ship's faction, depending on the status of
the checkbox [Use player inventory](4).

You can use hot keys to apply the required template Alt + #number of template.
Alt + 0 will remove all installed system upgrades.

Templates do not store upgrades, they just remember which systems should be installed, and try to search
for these in the inventory.

Known issues

* Upgrades do not drops out of the ship during a crash. In the event of partial destruction or change
in the ship size the upgrades, installed by SystemControl, are sent to the player's inventory,
even if the ship is lost from the collision.

* Upgrades that are installed by SystemControl are not displayed in the standard [system upgrades] menu.
The developer did not give the opportunity to correctly install ship system upgrades(or I can't find that way,
help me if I wrong), in form an API for working with inventory or somethig like it, or will allow to modify
the standard interface.
If I have one then it will be possible to improve the level of integration with the base UI.

Future improvements

* Add sounds to hotkeys;
* Save the current system set into the template by pressing Shift + Alt + #number;
* Make tamplate list srollable, increace template count to 9;
* Show inventory for drag the upgrades from inventory to current or template;
* All entities can has SystemUpgrades;

Credits

* Dirtyredz for the ShipScriptLoader.
* Multirez for everything else :)


7
EDIT: This does not eliminate the need in the ability to run invokeFunction on the script by its index, similar to Entity():removeScript().

Your current problem is that invokeFunction addresses the first attached script with certain name.
If done correctly, my way will work a bit differently: instead of invoking upgrades functions, upgrades themselves will invoke function of storage script (which can be only one per entity). And then your script will successfully get info from storage.

I meant that such a function is necessary for the completeness of the API, and not in this particular example.

8
Thanks rinart73 for the proposed solution.
Initially, I did not want to modify the vanilla scripts in the systems folder to avoid possible incompatibility with other mods that add / modify systems.
But your solution looks like more attractive and it seems that I can do the modification of a basesystem.lua only.

EDIT: This does not eliminate the need in the ability to run invokeFunction on the script by its index, similar to Entity():removeScript().

9
I already broke my head over this issue, the only thing that came to my mind was to add a copy of the first script to the end of the list, and then delete it, replacing with a fictitious dummy component. And so on until I reach the position I need.
Then I can delete script by index, this will make it possible to reduce the number of dummies on the object. The only exception is trading systems, but they can also be put into the cache by calling the secure() function.
In any case, such solution will result in a lot of additions and deletions of scripts only to get the current state.

Maybe you have any other ideas?

10
Well, I'll try to explain the situation less abstractly, sorry for my English
Quote
Quote
Often Entity has more than one script with the same name/path.
Does it? Can you give some examples?

If you install some upgrades on your ship and then try to Entity():getScripts() you can get something like this
Code: [Select]
...
9  :  data/scripts/systems/hyperspacebooster.lua
10  :  data/scripts/systems/hyperspacebooster.lua
11  :  data/scripts/systems/hyperspacebooster.lua
12  :  data/scripts/systems/batterybooster.lua
13  :  data/scripts/systems/batterybooster.lua
14  :  data/scripts/systems/energybooster.lua

How to invoke getSeed function from batterybooster.lua that is number 13 in script list???
Code: [Select]
    Entity():invokeFunction("data/scripts/systems/energybooster.lua", "getSeed") -- Always return seed for script #12
P.S.
I really thought to delete the script number 12, read the data for the 13th, and then restore the removed, but in this way the player will lose the accumulated energy in the batteries, shields, cargo, trade history and so on...

11
Mods / Entity():invokeFunction(script, args...) is not enough parameters?
« on: January 23, 2018, 10:25:34 AM »
Often Entity has more than one script with the same name/path. How to call a function in a second or an another specific entity script?

12
Mods / How to install the ship system upgrade from the script?
« on: January 19, 2018, 02:29:57 PM »
I want to make mod for quick swap and controlling of ship systems, but I can't seek a correct way to install system into ship from script. I tried to make something like this:
Code: [Select]
Entity():addScript(systemPath, seed, rarity)
And it adds a system script to the player ship and applies his bonuses, but it does not appear in the Ship-> Systems interface.

In addition, where can I get the maximum number of system updates or how to calculate it from the processing power?

13
Mods / Re: [MOD] Better Tradingsystem v1.1.2 (Updated 24.02.17)
« on: January 16, 2018, 09:24:22 AM »
is it possible to print the actual cargo, which i have on my ship, in that tab which is showing what i can sell to a station?

I had the same problem, I used a column with the volumes of the goods on my own ship, and I really missed it with this mod, so I decided to add it from base trade system.

I think this can be useful to other players, so the topic's author can update his mod. ;) I tried to transfer the code from the base tradeoverview.lua as accurately as possible.

Spoiler: show


Pages: [1]