Jump to content

Laserzwei

Members
  • Posts

    399
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Laserzwei

  1. You need to call it and pay the fee of 500.000Cr before every jump. You can call as many as you like. There is no jumprange limit. If your ship can go 50 Sectors - so will your Asteroids
  2. Part V Conclusion For whatever reason the /save command is more powerful than the default save and Server():save(). If the server would always save like with /save the Galaxy get/setValue is not necessary. I guess this is now a bugreport. I deeply apologize for the spam.
  3. Part IV Now come the odd parts: All tests with script1 and before leaving I typed /save. The rest is as above. dedicated server: 1 2 3 client 1 2 3
  4. Part III The singleplayer procedure: 1)create the new galaxy leave through menu 2)start galaxy again leave through menu 3)start galaxy again leave through menu 1 2 3 with script 2: 1 2 3
  5. Part II The following logs are cut down for readability and due to the 20.000 Character Limit. For the Server-Test I started the Server, joined and stopped with /stop. This was done 3 times. First I tested the dedicated Server on a new world with script1: 1 2 3 Then with script 2: 1 2 3
  6. Part I The full logs and the server.lua scripts are atteched to this post I used the following test setup: The server.lua was changed to: which will be referenced to as "script1" and with Server():save() which will be referred to as "script2" SaveTest.zip
  7. it is very easy: in the currently available release 0.9b there is a Folder "data". You simply extract the content in your games "data" folder and override what is in there (server.lua and claim.lua). That's it.
  8. The last time i tested it, it did not preserve the data over a Serverrestart. I will test it thorough tomorrow ;)
  9. I would like to propose that Galaxy[server] object gets getValue() getValues() setValue() and Galaxy[Client] getValue() like we have on Server, Sector and Entity objects. It would be perfect to save data over the course of a Serve restart.
  10. can we get the move asteroid feature on it's own mod? I hate when one mod grows in scope and start messing with everything around, so it becomes impossible to mix and match them without running in conflicts The jump asteroid mechanic is deeply entangled witch the "oosProduction.lua" script. It is necessary to 1) avoid doing the whole keeping data alive over sector-changes twice. 2) it would require to have multiple "server.lua" files for every combination. I truely thought about it. Bbut abondaned it due to these 2 problems. Maybe when the first iteration of the mod-Interfaces arrive: http://www.avorion.net/forum/index.php/topic,1356.0.html
  11. The description is a little out of date: Every mod that uses an GUI Element, such as the "move asteroid" option will be required client sided as well. I will change the description. Thank you.
  12. I sucks not being able to ;D If you really need lore in a SciFi game: The Hyperspacejumpdrives of ships in avorion are based on subspace folding a point in space and moving the ship through. With additional crew efforts and complex computaion it is possible to open such foldings in multiple locations at the same time. After the Space is folded the ship sends a microwaveimpulse to push the Astroid through the rift, as well as move itself to reach the next sector. This is how the Astroids gets jumped. 8) It's very cheap currently (just claiming it). I give you that. Some internal details about how the script moves the Asteroid: As soon as the player leaves the sector, the "moveasteroid.lua" script on it will begin cleaning up other scripts and hook, calls the "oosproduction.lua" script so that it knows that it has to create a new asteroid in the next sector and only then the script destroys the "old" asteroid. The last step is as soon as the player enters the next sector, a new asteroid is created with the same properties and scripts. Now why did i have to make this ridiculous bypass over the "oosproduction.lua" script?- Because the "moveasteroid.lua" does not survive an sector change. In fact it causes a fatal error that crashes the whole server. It's the same error as in the roadmap. The most likely reason for it to occur is a race condition that unloads the sector before the scripts from the asteroids (notice plural!) finish and trying to call hooks in an unloaded sector and then crashing the server. Also I haven't found an easy teleport Entity from sector to sector method. Why not move whole stations(this includes especially Mines)? The way these Entities are stored and structured is very thinnly documented. It would be an tremendous effort work into. Only thereafter one could transfer the entity over with the same workaround i just mentioned. And that is the reason why I was not able to such an easy task within less than a day. In 0.9_3 transferring an Asteroid will cost 500.000Cr per jump and you need to be in range of 10km. No matter how far that is. However bugfixing has the highest priority. Edit: typo Edit2: The introduction of the Asteroid teleport is a preperation mainly for Roadmap 1.2 where all stations within a sector are able to trade with eachother while the player is not present.
  13. A semi-good inbetween solution would be if we had a folder wherein every lua file gets called once e.g. on serverstart. So we modders can set up our hooks(Callbacks) into the game and don't depend on modifying existing .lua files.
  14. As Freaky89 says: you can easily merge the others as my mod does not need the state of the server.lua , but requires it as an entrypoint into the game. Also v0.9_1 released
  15. This definately happens when an ship is in production and you log off. At least the 'job.shipOwner' value gets lost in the saving process when logging off or can't be retrieved when the player logs in. Here is a small fix for it: In Avorion\data\scripts\entity\merchants\shipyard.lua at line ~450 replace the update(timeStep) with this one: function update(timeStep) for i, job in pairs(runningJobs) do job.executed = job.executed + timeStep if job.executed >= job.duration then if(job.shipOwner == nil) then job.shipOwner = Sector():getPlayers() end if onServer() then createShip(job.shipOwner, job.singleBlock, job.founder, job.insurance, job.captain, job.styleName, job.seed, job.volume, job.scale, job.material, job.shipName) end runningJobs[i] = nil end end end
  16. Well I just tried it: function onPlayerLogIn(playerIndex) local player = Player(playerIndex) Server():broadcastChatMessage("Server", 0, "Player %s joined the galaxy"%_t, player.name) player:addScriptOnce("headhunter.lua") player:addScriptOnce("eventscheduler.lua") player:addScriptOnce("story/spawnswoks.lua") player:addScriptOnce("story/spawnai.lua") player:addScriptOnce("story/spawnguardian.lua") player:addScriptOnce("story/spawnadventurer.lua") matchResources(player) print("Mail") local mail = Mail() mail.money = 1000 mail.sender = "Apocalyptic Galaxy" mail.header = "Greetings newcomer" mail.text = "Welcome to Apocalyptic Galaxy " player:addMail(mail) end and it had the following result: http://imgur.com/a/wb2zZ edit: img-tags didn't work :P
  17. try without mail.receiver = player.id if that doesn't help add mail.money = 0
  18. addMail(mail) to player:addMail(mail) addMail(mail) is a method that belongs to the player object
  19. using the API of the Mail object: http://stonelegion.com/Avorion/Documentation/Mail.html you want something like this: function onPlayerCreated(index) local player = Player(index) Server():broadcastChatMessage("Server", 0, "Player %s created!"%_t, player.name) local mail = Mail() mail.money = 1 mail.sender = "Your Server name" mail.receiver = player.id mail.header = "Greetings newcomer" mail.text = "You get ".. mail.money .." free money!" addMail(mail) end
  20. I updated the description to point out that this mod is not performance heavy. It does not load any additional Sector (iirc. the current API doesn't even allow that). However it requires about 2ms once a player switches a Sector. I didn't declare my mod stable, because i couldn't test on a server with multiple players. It is however tested on a dedicated Server with a single player logged in. If you could provide me a server log and the content of galaxyticks.txt that would give me probably everthing i need. Pastebin.com is perfect for that. Don't forget to anonymize the data short answer: No. Longer Answer: To do so I would need to get how your mining ships are structured. In detail: what turrets is it using?, how many?,what materials can it mine?, How fast can it mine?, how big is the ship?, how fast?, Collisionbox and collision probability?, how many asteroid are in the sector?, which ones can be mined?, which ones should be mined?,where should the ship be when the sector is entered?That are the first questions that come into my head. This all has to be calculated in the loading screen when you swicth sectors. And for some of the questions the API doen't even give an option to look for them. But if you have some experience in modding with lua you might be able to find the aswer to these problems yourself ;)
  21. Deprecated As of 0.16.1 ALL features of oosp are included in vanilla. Therefore no update for 0.16 will occur. As of beta0.15.8 most features of oosp are in vanilla. The following features are now part of vanilla: emulating NPC Factories consuming goods on Mines/Tradingposts/Shipyards/Equipmentdocks/etc. Adding goods to Tradingposts This mod (from v. 0.99_5 onward) will include: Replenishment of resource depots Updating the build progress in shipyards is now included here. pre 0.15.8 (< 0.99_5): Installation Guide If you are updating from 0.15.7 to 0.15.8 foollow the spoiler: Extract the "data" and "mods"-folder from the zip file into your <installdir>\Avorion\ folder. You should end up with a structure like this: /Avorion/data/* /Avorion/mods/oosp/* *I don't give any warranty. Your fridge might catch fire. -Who knows? :o Version history Filestructure: License Public Domain
×
×
  • Create New...