Jump to content

multox

Members
  • Posts

    18
  • Joined

  • Last visited

multox's Achievements

0

Reputation

  1. Solved - in the cheat menu, the GOTO command moved the stations back.
  2. I have a group of 3 space stations that are docked together. Today I jumped into the middle one and suddenly the whole group flew off. They ended up 8.5 million meters away. Now, it's nice to know that this game can handle such huge ranges. But it's going to be rather difficult to supply these stations... How can I bring my stations back? I tried to /teleport, but that kept them at the same relative positions.
  3. multox

    [MOD] TrashMan

    Thanks! I'm glad you like it. May I ask which mod pack that is? Is it DockBuilder? I'd like to pull it down when you're done.
  4. multox

    Combat Update

    Hello developers, would it be possible in the Combat Update to switch the weapons data to be pulled from an XML file? After digging through the code that generates turrets for NPC drops and the turret factories, it seems that a single-source location for defining the rules for each type of weapon would be really helpful for people who wish to mod them. Thanks for the consideration!
  5. multox

    [MOD] TrashMan

    Description Let's you mark with a click all of those hundreds of useless items to sell all at once the next time you visit the appropriate merchant. Provides a UI so that you can select which tiers of items to sell. Items already favorited will not get marked for sale. Notes This is the initial alpha release and most likely has lots of bugs. Mod Compatibility Compatible with all other mods. Version Compatibility This has only been tested against Avorion Beta 0.15.7 Installation [*]Extract the zip file to your Avorion directory. No files will be overwritten unless you already have this script installed. [*] Option A: Use the ShipScriptLoader at http://www.avorion.net/forum/index.php/topic,3918.0.html Option B: Hit enter and paste this into your chat window /run Entity():addScript("../../mods/TrashMan/scripts/TrashMan.lua") (With option B, you will have to do that once each time you create a new ship.) [*] If you're playing on a dedicated server, the server also must have this mod installed. TrashMan_0.1alpha.zip
  6. Thanks! That set me on the path that I needed.
  7. That's an excellent tip, thanks! Here's the problem though, the getTurret() and getTurrets() functions both return an Entity (as documented), not a TurretTemplate which is what I was hoping for. I can't seem to find any way to retrieve the run-time data from a turret. Once I retrieve the turret's entity I don't know how to dig any further. function test() print("player is " .. player.name) local craft = player.craft if not craft then return end print("craft is " .. craft.name) local numTurrets = craft.numTurrets if (numTurrets < 1) then return end local turrets = { craft:getTurrets() } for k,turret in pairs(turrets) do if (turret.isTurret) then print("This IS a turret.") end ShowMetaTable(turret) <--- Inspecting this shows it is an Entity end end
  8. I'm having trouble writing a change to an item in a player's inventory on the server. Although I've found the object and changed the property that I want changed nothing appears different. I suspect that I'm missing a key step but not sure what. Any hints? function onMarkTrashPressedServer(enabledMaterials, selectedRarities) if onClient() then return end local itemsMarked = 0 local inv = Player(callingPlayer):getInventory():getItems() for index, slotItem in pairs(inv) do local iitem = slotItem.item if ((iitem == nil) or iitem.trash or iitem.favorite) then goto continue end local item = SellableInventoryItem(iitem, index, buyer) local name = Rarity(item.rarity.value).name .. " " .. Material(item:getMaterial()).name .. " " ..item:getName() local material = Material(item:getMaterial()).value local rarity = Rarity(item.rarity.value).value if (enabledMaterials[material]) then local selectedMaxRarity = selectedRarities[material] if (rarity <= selectedMaxRarity) then --print("Trashing " .. name) iitem.trash = 1 inv[index] = iitem ???? <---- What needs to be done here to save the trash change? itemsMarked = itemsMarked + 1 end end ::continue:: end Player(callingPlayer):sendChatMessage("Server", 0, itemsMarked .. " items have been marked as trash.") end
  9. It doesn't turn off shield damage, just hull damage.
  10. Entity() differs from script to script, I think the best way to find the turrets is to get player, then player's ship and so on. Never used those though, at one time I tried to so that I could provide better stats for energy weapons, but I wasn't able to access to the player ship stats. As I've said though, after failing to access those stuff, I didn't try again. Be cautious about where/when you execute your script though, you don't want to execute stuff unnecessarily. I wrote a different small mod to create a "Watch Window" for debugging purposes in which I intended to view certain variables such as heat. For heat, I actually did exactly what you're suggesting here which is to get the player then his craft then the array of turrets. Both getTurret() and getTurrets() returned a single entity rather than a TurretTemplate.
  11. Hey Lyravega, thanks for your comments. I eventually got that about Fire Rate. I asked that question before I had yet looked at any code. :) "adding more components to a turret should never decrease the DPS..." I specifically saw the eDPS going *down* when adding additional parts to a launcher. I couldn't understand why it was happening due to the limited amount of data present in the UI. That was my original reason for looking into the code anyway, but while digging through that reason became less important to me than all the other cool things that could be done. At one point I did notice the same thing happening in my code. In my case it was being caused by not capping generated heat to max heat. If a weapon can actually get hotter than max heat then I do indeed need to revisit that. That brings me to the Entity:getTurret()/getTurrets() API. I was trying to call those today from another script so that I could query the current heat of a weapon. For some reason all I get back is another Entity object from either of those calls. Is this a bug or am I supposed to be casting/converting the returned object somehow? Sorry, I'm new to this. So, regarding your three points. (Thank you very much, by the way!) 1) So one thing I noticed is that there's turret totals and weapon totals. The turret shots per second value already seems to take into account the total of the weapons. This led me to the conclusion that the turret data can be used rather than calculating out the totals via active weapons, and individual barrel damage. (At least for the weapons I looked at it was correct and it matched 100% with the developer's DPS calculations.). As for simultaneous weapons, it appears to me as if that may not affects DPS. My understanding is that it just means all of the weapons fire at the same time and the same rate, but they don't actually fire faster. So 4 barrels with 3 shots/per second each will still fire at a total of 12 shots per second regardless of whether they are coordinated to shoot simultaneously or not. 2) I'm trying to dig further into max heat, but having trouble verifying it one way or the other due to the API problem that I mentioned earlier. You're correct in that I made the assumption that a weapon couldn't get hotter than max heat. 3) In this case my calculations appear to be correct. Where a weapon cools down faster than it heats up then my script sets the heatCoolRatio to 1. So anything that doesn't accumulate heat has no impact on DPS. Hey, I like this collaboration thing! I didn't really want to go into competition with your script, but I also did want a few things slightly different. One thing that I realize now is that I really liked how your script highlighted Independent Targeting at the bottom. I missed that when I went back to playing the game.
  12. Please make any turret be usable with Independent Targeting. Please remove the DPS penalty from Independent Targeting. Instead, weapons that are used in automatic mode should require more crew to man since the captain is no longer assuming direct control. It doesn't make any sense to me that turrets shooting with dedicated crew are less capable than turrets that are en masse controlled by the captain. I don't see how the captain having direct control over each and every weapon would increase each weapon's DPS. It also, for me anyway, reduces the realism of the game. I'd really like to see broadside battles be more of a thing for the larger ships.
  13. I LOVE this idea! I also keep losing the mouse cursor during busy battles. Other solutions that I've seen involve making the mouse cursor much more visible. One of my favorites is to surround the cursor with a ring about an inch out from the cursor itself.
  14. So I dug into the modding docs and took a look at this mod. There were a few things that bothered me in that the calculations didn't seem correct. For example, there were times that adding more components to a turret in the Turret Builder would actually decrease the DPS. In the process of investigating these issues I ended up building an entirely new mod. This isn't meant to imply that the OP's work isn't excellent! I thank him very much for his mod. However, the mod that I've attached is more tuned to my personal tastes and resolves the issues that I noticed. Please feel free to include in the original mod or not. WeaponTooltips.zip
×
×
  • Create New...