Jump to content

infal

Members
  • Posts

    50
  • Joined

  • Last visited

infal's Achievements

0

Reputation

  1. I think it depends specifically on what you want to do. My mod, Infinion Irregular Goods Transportation uses a script on the player to register and handle onSectorEntered events. That event handler searches all ships in the sector and finds any with entity/antismuggle.lua and removes that script and adds a customised version (mods/infinionigta/antismuggle.lua) If I needed to save any data for the military ships, I would do it with secure/restore in the custom antismuggle script. If I needed to save data relevant to the player, I would do it in the player script. I don't know exactly what you're trying to achieve but it sounds like you would do something similar. When the player enters a sector, check all of the stations to see if any you're interested in: a) exist , and b) have your custom script. If not, add the custom script. In the custom script, save any data relevant to the station.
  2. I'm not sure what you mean. This?: <ModLoader> -- Required version of Infinion Corporation: v1.0.0 <ModLoader> -- Actual version of Infinion Corporation: v1.0.2 As long as the actual version is greater than the required version it is considered okay.
  3. Ahh... no. None of my mods do anything with planets. It's not suspicious to you that planets are cuboid on the 1st of April...? Improved Planet Visuals released by Koonschi ;)
  4. Also, ModLoader puts a lot of info into the log files that you can look for to see if it's running, or if there was an error that gets the script set to invalid by the game engine. Client log: %appdata%/Avorion/clientlog *.txt <ModLoader> Initializing ModLoader <ModLoader> Registering mod: Cargo UI ... <ModLoader> Running onInitialize for mod:Cargo UI <ModLoader> Registering player ship script: mods/cargoui/interface.lua Server log %appdata%/Avorion/galaxies/savename/serverlog *.txt <ModLoader> Running onInitialize for mod:Infinion Irregular Goods Transportation Addon <ModLoader> Registering player ship script: data/scripts/modloader/lib/adminui.lua
  5. Admin UI will only show if a mod registers an admin ui module AND the modloader/config.lua : t.giveAdminPanelAutomatically is set to true (which it is by default). If no mods call registerAdminUIModule, then the script isn't attached to the player ships, to save system resources. No sense having a script attached to every player ship if it's not doing anything meaningful. Cargo UI doesn't actually add an admin ui module, as in my mods I'm using the admin ui to cheat in items for testing etc and cargo ui doesn't add any new items. The Cargo UI icon will only show when you're in a ship, not the drone. If you want to manually attach the admin ui to a ship, you can use the command /run Entity():addScript("modloader/lib/adminui.lua")
  6. As I said before, I haven't had any problems installing mods. It's only when you uninstall mods that the game can delete entities and respawn players.
  7. infal

    [Mod] Cargo UI

    Yeah it's definitely possible to add more features. The only reason I haven't is because I expected the mod to have a very short lifespan. Koonschi has said somewhere that he's aware of the cargo window problem and will fix it so, when he does, this mod will be redundant.
  8. infal

    [Mod] Cargo UI

    Updated for Mod Loader v1.2.0 Honestly I thought this one would have been redundant at the last Avorion update, but it seems to still be useful.
  9. Overview; Adds an Arbitrary, Military and Civilian Turret Control System with slightly boosted stats over the base game versions. The Infinion Corporation modules give 2 more turrets than base systems but there is a random factor that means legendaries can add up to 9 turrets. They are random loot drops from Military and Civilian NPCs. If you want them... you wont get them from Xsotan or Pirates. This was really a proof of concept for Mod Loader but it's a good addition to the game. Screenies: Downloads: You need to have Mod Loader v1.2.0+ Mod Loader Forum Topic Infinion Faction Modules v1.0.0 Zip Download
  10. Okay, I've got v1.2.0 of my mod loader up. It adds 3 functions for mod authors: One that lets you register system upgrades as loot drop for NPCs. One that lets you register a script that will be attached to the player ship any time they enter a ship, and, one that lets you add a module to a mod loader admin panel. More info in the OP. I've also added a mod template and a new mod that just shows how to add some basic, modified system upgrades. (just copies of the existing turret systems with boosted stats.) I also forked a 1.3.x dev branch on GitHub
  11. Thanks, it was the smallest of typos but I didn't notice until you pointed it out. I've just put new versions of all 3 downloads with bug fixes and better features. Version History: v1.0.2 25Mar2017 - So many bug fixes... - Dangerous goods permit now actually works! - Now works for military ships that spawn in, faction war etc - Dangerous goods permit now gives a regular warning. Default is every 5 minutes, can adjust in config.lua - Admin UI is now integrated with the Mod Loader Admin UI - Fixed typo in check for home sector (Special thanks to Devious for pointing this out) - Made the Cargo Shield modules very power hungry (20 something GW for legendary) but can be scaled by changing powerFactor in config.lua though they are supposed to be power intensive for balancing. If you're updating, get all 3 downloads!
  12. Exactly. I don't want to spend a bunch of time writing something that is literally already being officially developed, but on the other hand Mojang promised a modding API for Minecraft and 5 years later we have "resource packs". :o
  13. I'd think of that as more a launcher, but maybe that's just semantics. Regardless, what you've described is well beyond the scope of what I'm doing at the moment, but I like the ideas. If no one works on something like that, I might look at it in the future. I'd probably want to put all of the core functionality in a c static lib and make it compatible with zip and patch files. With a proper launcher, a lot of the stuff I'm doing at the moment could be simplified to just a set of utility functions. Having that functionality built in to the game engine would be best though as that would make it possible to have per-save mod configurations and client downloading from server.
  14. Well I expect... no, demand, 75% of all profits ;D I don't really need any special mentions or anything, just pay it forward. As you get better and better at scripting /programming etc you start to find that you're less often the person asking questions and more often the person answering questions. So, as you get more experience, help the people starting out where and when you can. If you do that, my job here is complete. I've run into the problem of renaming scripts causing problems myself. It seems like the game engine handles missing files by just deleting objects so, uninstalling mods is a challenge. If you need to test, use the debug menu to spawn a research station. /run Entity():addScript("lib/entitydbg.lua") I'm glad it all worked for you. I like playing in a mid sized ship... don't like 5 - 6 of my 8 - 10 upgrade slots being Xsotan artifacts, so will definitely add this mod in. I'd say start a new thread for the mod release, a lot of people just wanting to download mods wont necessarily click a thread asking for help with scripting.
  15. Okay, the selectedObject was a long shot but worth considering. Obviously the loot entity stores a reference to the player ship once the player is close enough to pick it up but maybe it's not exposed to LUA. Scanning every entity in the sector would be inefficient. Especially if it's a sector with thousands of asteroids. You can do it other ways though Sector():getEntitiesByType(EntityType.Loot) or you could build a table of loot entities as they're created with onEntityCreate event and then remove them from the list with onLootCollected (and maybe onDestroyed, for despawning?) Then once you have a manageable list of loot entities you can test those for distance to the player ship. I really like the idea of fighter craft that are specifically for loot collection only, no weapons.
×
×
  • Create New...