Jump to content

Evil33

Members
  • Posts

    6
  • Joined

  • Last visited

Evil33's Achievements

0

Reputation

  1. I totally agree with Kelevra on the idea of torpedoes and fighters using trading goods for production. I would love to see torpedoes being similar customizable as turrets are. Kinda like: One can decide on a material giving the torpedo some basic attributes, more warheads increase the damage, engines make it faster, targeting systems more agile, steel might increase the durability and slightly the hull damage but reduces acceleration and agility, EM charges can give / increase shield damage / penetration, steel tubes determine the number of fired torpedoes / multi warhead capability ( distributing total damage equally on all torpedoes in the fired swarm) It would give torpedoes so much possibilities :D Maybe when the boarding part is implemented, one could even fire marines to the other ship :D
  2. Try it with the chat command /haulgoods start I didn't use the UI very much, perhaps it's only a problem in this part.
  3. I missed that you were looking for an update for the beta ^^" sry I fixed the script (as far as I see) for the 0.15.6 update released yesterday. Might be that I missed something, so tell me about your results :) haulgoods-oos-0-15-6.zip
  4. As far as I can see, it still works. But as I checked the script I got the feeling, that after a server restart a player must visit the sector once, because the docking sequence doesn't finish. After a first visit they can be left alone again. :-\ Maybe the lazy update in the server config can change that behavior. Edit: I've added another debug message for the first server update after startup and made some minor fixes to the secure and restore functions. It works after server restarts, if the sector was visited once after script/game update, at least it worked like that for me. haulgoods-oos.zip
  5. I've packed the files I touched together, so you can give it a try, might be a better explanation than my wall of text above ^^" I've changed some parts of my modification, so I'm closer to the original code now. Edit: Seems I broke some things trying to save the data to the database, now it should work ^^" I can't save entities directly but need to save the indices. Edit2: Seems like the secure and restore functions don't like me, they give me tons of errors, that the entities can't be created but I definitely wrote them in correctly... at least I hope so... Edit3: I finally found it :D As it seems, I can't call Entity(uuid) in the restore function, so the script fails to restore the references, I changed all calls on the tables to Entity(tableContent) so the only thing restored and saved are UUIDs, so far it's looking good. Edit4: After some more debugging I found out that the missing docking positions must have been an inconsistent state of my server. I added a test for this case and a workaround, but was able to remove my changes to the dock.lua haulgoods-oos.zip haulgoods-oos-fixed.zip
  6. I've taken a look into this mod, because I wanted to make it work, even if I'm not in the same sector as the ship. The first thing I found out, was that this script was always started anew when a game was loaded. I took a look at the station scripts and found out that they save their state and restore it afterwards. So I added this to the haulgoods script. function restore(values) haulGoodsStage = values.haulGoodsStage haulGoodsList = values.haulGoodsList haulGoods = values.haulGoods haulGoodsDispatcher = values.haulGoodsDispatcher haulGoodsRoute = values.haulGoodsRoute end function secure() local route = {} return { haulGoodsStage = haulGoodsStage, haulGoodsList = haulGoodsList, haulGoods = haulGoods, haulGoodsDispatcher = haulGoodsDispatcher, haulGoodsRoute = haulGoodsRoute, } end Another thing I had to change for this to work was the haulGoodsRoute, in the original version the stations are saved there, for this save and restore to work I needed to change this to the index of the stations, so I changed the return value of the requestGoodsRoute function to: return from.index, to.index, good, amount In response to this, I also had to change all calls of haulGoodsRoute[1] to Entity(haulGoodsRoute[1]) , same for index 2. That gave me another error, in fact it seems like the docking positions of a station can not be determined, as station:getDockingPositions() in dock.lua returned nil, nil when out of sector. Replacing line 12 in dock.lua with local pos, dir = station:getDockingPositions() if (dir == nil) then dir = station.up; end if (pos == nil) then pos = station.translationf; end solved the problem and gives the ship a faint idea of the docking positions. A last error thrown in haulgoods_cmd.lua in line 12 player:sendChatMessage("HaulGoods", 0, errorMessage .. help) can be simply solved by surrounding it with a test: if (help ~= nil) then player:sendChatMessage("HaulGoods", 0, errorMessage .. help) end I hope my explanations are somewhat understandable ::) I really like the idea of this mod and would love some other opinions on my changes. And for what I can say, it works out of sector. :o well that post got bigger than I thought :D
×
×
  • Create New...