Jump to content

Laserzwei

Members
  • Posts

    399
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Laserzwei

  1. I did. Thank you for your comment ;)
  2. from tradingmanager.lua buying: -- empty stock -> higher price local factor = getNumGoods(goodName) / getMaxStock(good.size) -- 0 to 1 where 1 is 'full stock' factor = 1 - factor -- 1 to 0 where 0 is 'full stock' factor = factor * 0.4 -- 0.4 to 0 factor = factor + 0.8 -- 1.2 to 0.8; 'no goods' to 'full' local relationFactor = 1 if sellingFaction then local sellerIndex = nil if type(sellingFaction) == "number" then sellerIndex = sellingFaction else sellerIndex = sellingFaction.index end if sellerIndex then local relations = Faction():getRelations(sellerIndex) if relations < -10000 then -- bad relations: faction pays less for the goods -- 10% to 100% from -100.000 to -10.000 relationFactor = lerp(relations, -100000, -10000, 0.1, 1.0) elseif relations >= 50000 then -- very good relations: factions pays MORE for the goods -- 100% to 120% from 80.000 to 100.000 relationFactor = lerp(relations, 80000, 100000, 1.0, 1.15) end if Faction().index == sellerIndex then relationFactor = 0 end end end return round(good.price * relationFactor * factor * buyPriceFactor) selling: local factor = getNumGoods(goodName) / getMaxStock(good.size) -- 0 to 1 where 1 is 'full stock' factor = 1 - factor -- 1 to 0 where 0 is 'full stock' factor = factor * 0.4 -- 0.4 to 0 factor = factor + 0.8 -- 1.2 to 0.8; 'no goods' to 'full' local relationFactor = 1 if buyingFaction then local sellerIndex = nil if type(buyingFaction) == "number" then sellerIndex = buyingFaction else sellerIndex = buyingFaction.index end if sellerIndex then local relations = Faction():getRelations(sellerIndex) if relations < -10000 then -- bad relations: faction wants more for the goods -- 200% to 100% from -100.000 to -10.000 relationFactor = lerp(relations, -100000, -10000, 2.0, 1.0) elseif relations > 30000 then -- good relations: factions start giving player better prices -- 100% to 80% from 30.000 to 90.000 relationFactor = lerp(relations, 30000, 90000, 1.0, 0.8) end if Faction().index == sellerIndex then relationFactor = 0 end end end return round(good.price * relationFactor * factor * sellPriceFactor)
  3. Might be possible with a mod. Very unlikely to be realized with a mod atm. Probably belongts to the Suggestions subforum.
  4. The 2nd gameplay decision involved with moving lots of Asteroids: Multiplayer. Simply put I want to prevent a single player to grab all easily accessable Asteroids and leave nothing but a wasteland for others. I have never tested it, but it should work.
  5. I have no plans to change the current setup. If you think that your changes are worth to be used by other players, then pack them into a mod and publish it in a seperate new Topic.
  6. It was a gameplay decision from the very beginning to keep the menu-range at 10km. If you want to move this many asteroids through the Galaxy you bring patience and a really long Jump range. It breaks the 500,000Cr per Jump rule. So it won't happen. Thank you very much. It is a known limitation. I hab wrapped my head around it and there are 2 solutions: 1) Check every Sector a player enters, if it has claimable Asteroids and add the moveAsteroids script on those that need it. This takes up server resources and is totally useless when [mOS] has been installed from the very start. 2) Add a player command to add the script on stated Asteroids. A little more tedious for players, but the server doesn't get a constant load. I haven't decided which solution I will take yet. 1) has the advantage that I could make the hook into claim.lua(Vannilla gamefile) obsolete. This opens the option to add this mod into an modloader. Since it is an edge case scenario, it has a low priority atm.
  7. Yeah i do. If the turret looks to awesome to be true, chances are high that you get a different worse turret. It seems to be those turrets where you can get boni by decreasing ingredients. turretfactory.zip
  8. not sure if it's still up to date: www.avorion.net/forum/index.php/topic,1416.msg14444.html
  9. Yes it is possible! It is pretty much the same as this here: https://www.avorion.net/forum/index.php/topic,832.0.html Edit: from a programmers point of view.
  10. Edit 1: Sector():spawn Station/Ship/ASteroids etc. expects an EntityDescriptor. Sector():createEntity() expects an EntityDescriptor. You can build very customized Entities that way. It can have Components [enum ComponentType] (which you can't get from an spawned Entity!) Also some other properties which later become read only/ not readable at all might be set there. Edit2: my move Asteroid mod uses this to create Asteroids.
  11. With API based modding it currently is not possible to keep an Sector loaded. Koonshi said in an interview last month that keeping sectors with player assets loaded might be included in the Vanilla game. As an alternative some modders might simulate the behaivior of AI ships in an unloaded Sector.
  12. Player functions and variables are available in Documentation/Player[Client].html and Documentation/Player[server].html. Yet you found some Functions I didn't know existed. I'm interested in such functions for the Entity-object :) Damn I always wanted to know where to get the "callingPlayer" Variable. This could be helpful.
  13. Great List thank you. The Entity Object would be nice
  14. From the Documentation. These are all available Stats to be modified by modules:
  15. From what I can tell renaming an Sector after it got created is not possible (yet). Maybe ask Koonshi to add that. But looking at /scripts/sectorspecifics.lua you might be able to change the name of an Sector, when its template gets generated
  16. I have sent you a private message.
  17. It tells me a lot mor than you think: From the frontpage and from your client log: You didn't update the move Asteroids mod. Try that. move asteroids If it still fails please also give me a list of all other mods you have installed, so I can reproduce any incompatibilities.
  18. Would you mind sending me your client and serverlog (in the galaxyfolder)
  19. No I don't. Programming is not something 5-year olds should do. Playing in a sandbox is :D. Additionally programming takes dedication and responsibility. You are responsible that your code doesn't interfere with the game itself (e.g. crashes), that it has a minimum of compatibility with other mods and that you maintain updates for your users. But I know I'm not writing this to an 5-Year old. Excellent one thing less you have to worry about :) This is the most important one. If you aren't familiar with these, you won't be writing an ingame mod to change colors anyway. Some things to get started local entityPlan = Entity():getPlan() --get the Blockplan of the Entity where the script is executed entityPlan:setColor(ColorRGB(0.5, 0.0, 0.0)) -- make everything red entityPlan:setMaterial(MaterialType.Iron) local resources = {entityPlan:getResourceValue()} local money = entityPlan:getMoneyValue()
  20. Did you add player:addScriptOnce("player/pvpSecure.lua") in the client sided server/server.lua? That yould explain the failed search on the client side.
  21. Why use an external program when you can do it ingame? Read the Documentation on BlockPlan and BlockPlanBlock. Become Familiar with RGBColor coding. Get to know how to traverse Trees: Tree traversal# call Entity():getPlan() to get the Blockplan and use the previously aquired Information accordingly. I did not experience such behaivior. Maybe ask around in the troubleshooting section?
  22. From The API in Setor(Server): 1) function Entity createStation(Faction faction, BlockPlan plan, Matrix position, string... scripts) with scripts being either /entity/merchants/repairdock.lua or /entity/merchants/shipyard.lua
×
×
  • Create New...