Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - loudent

#46
thanks, finished up the script and added my mod.
#47
Mods / MOD: Jettison Cargo on Death
April 22, 2015, 10:40:43 PM
Title: Jettison Cargo on death
Author(s): loudent
Description: Jettisons the players cargo when they die
Mod version:1.2.0
Game version:1.2.9
Game mode: any
You can get it on steam or from the nexus at http://www.nexusmods.com/voidexpanse/mods/13/?

This is a mod I put together after I died a few times deep in hostile territory with a cargo full of alien artifacts. I thought it would be cool if I could fly back in and fight off the mob that killed me and retrieve my Cargo.

Well, now we can!. It should be noted that we're not actually jettisoning the cargo. Instead it creates a space crate with all the items and cargo in your ship (minus quest items) so it is intended to be used in the harder difficulties. If you use it on easy you will be duplicating your items.

Cheers,
-Loudent

P.S. spectial thanks to ai_enabled for his ample assistance while I was making this mod
#48
Help section / Re: Creating an empty space crate
April 22, 2015, 01:17:13 AM
Seems to be working :)
#49
Help section / Re: Creating an empty space crate
April 22, 2015, 12:55:48 AM
Will do, thanks.

-Loudent
#50
Quote from: ai_enabled on April 22, 2015, 12:06:00 AM
Hello!
You need to edit the item XML file and add "quest_item" to the "flags" element like we done for some quests items available in the game.
Regards!

I see, and is there a way to check for this flag using the API or do I have to go and read the xml file?
#51
Help section / Re: Creating an empty space crate
April 22, 2015, 12:29:27 AM
Actually, if I pass null for the drop list I get the following error:

22.4.15 00:28:31.0224 [ERR] Script invocation exception: script "data/scripts/global/ldt_jettisoncargo.js"
Exception System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   -------------------------stack-------------------------
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at AtomicTorch.SpaceRPG.Server.Scripting.GlobalScopes.ScopeGenerator.AddContainer(Int32 systemId, Double coord_x, Double coord_y, String typeID, String dropListID, Object tags)
   at binder_for_AtomicTorch.SpaceRPG.Server.Scripting.GlobalScopes.ScopeGenerator.AddContainer(ScriptEngine , Object , Object[] )
   at Jurassic.Compiler.Binder.Call(ScriptEngine engine, Object thisObject, Object[] arguments)
   at Jurassic.Library.ClrFunction.CallLateBound(Object thisObject, Object[] arguments)
   at Jurassic.Library.FunctionInstance.CallWithStackTrace(String path, String function, Int32 line, Object thisObject, Object[] argumentValues)
   at LDTOnShipDestroyedHandler(ScriptEngine , Scope , Object , FunctionInstance , Object[] )
   at Jurassic.Library.UserDefinedFunction.CallLateBound(Object thisObject, Object[] argumentValues)
   at Jurassic.ScriptEngine.CallGlobalFunction(String functionName, Object[] argumentValues)
   at fOjZMNuuN0lHLFXgsOw.eWvU7yujosPi3g8qJRo.dDXuMhBoIb(String  , Object  )
22.4.15 00:28:31.0263 [IMP] Ship Loudent will be respawned at SystemID=43
22.4.15 00:28:31.0273 [ERR] Unhandled exception in Server game loop
Exception System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   -------------------------stack-------------------------
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at jvMuEfWa4dI5JoCFn5h.qLinMVWiyGcCwUBomHI.LNLpgxUlx9(Double  )
   at vxVLwDhWYiEysuRM7sN.ml7y5YhuRUkrQAmipFF.<>c__DisplayClassc.<ServerTick>b__2()
   at yh4Zn3002uxc4RoZtM8.gAxJV70qX9ONgNlNcs7`1.FnFGVddIss(Func`1 function, Func`1 shouldAbortCheckFunction)
   at vxVLwDhWYiEysuRM7sN.ml7y5YhuRUkrQAmipFF.lPDtIYPk3R(Double  )
   at vxVLwDhWYiEysuRM7sN.ml7y5YhuRUkrQAmipFF.EaltAtbg4x()
#52
It happens every time.

And the script I linked to in my original post is pretty much the entire mod.
#53
Help section / Re: Creating an empty space crate
April 21, 2015, 11:28:18 PM
Thank you very much
#54
Is there a way to tell if the item is a "no-drop" quest item (like the barrich device)? In particular I'm interested in figuring out if it's the kind of item that stays in your inventory when your ship is destroyed.
#55
Help section / Creating an empty space crate
April 21, 2015, 06:04:50 PM
Hey All,

I'm trying to create an empty crate in space but the generator.AddContainer() requires a droplist xml as an argument. I've tried creating an xml with no items in the list but that gives me more errors.

Is there a way to create a crate in space without any contents?

I guess worst case scenario is I could delete the contents of the create first but I figured I'd check before I went that route.
#56
Ok, I've been wrestling with this for days and I finally got a proof of concept working except I'm getting this error after the script finishes:

21.4.15 17:25:22.8945 [ERR] Unhandled exception in Server game loop
Exception System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   -------------------------stack-------------------------
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at jvMuEfWa4dI5JoCFn5h.qLinMVWiyGcCwUBomHI.LNLpgxUlx9(Double  )
   at vxVLwDhWYiEysuRM7sN.ml7y5YhuRUkrQAmipFF.<>c__DisplayClassc.<ServerTick>b__2()
   at yh4Zn3002uxc4RoZtM8.gAxJV70qX9ONgNlNcs7`1.FnFGVddIss(Func`1 function, Func`1 shouldAbortCheckFunction)
   at vxVLwDhWYiEysuRM7sN.ml7y5YhuRUkrQAmipFF.lPDtIYPk3R(Double  )
   at vxVLwDhWYiEysuRM7sN.ml7y5YhuRUkrQAmipFF.EaltAtbg4x()

The script can be found at https://www.dropbox.com/s/wmofwjt210nq4cg/ldt_JettisonCargo.js?dl=0
#57
Honestly there's not much more than what I posted here. the script exists mostly to test how to do it but you can find the whole thing at:

https://www.dropbox.com/s/bqsyfyigsqxvlpy/JetCargoOnDeath.zip?dl=0

#58
The return was a non-zero id.

I know the call to create the container was successful because I saw the container in the game. It's simply that it doesn't allow me to add anything to it.

although, perhaps that's the nature of those types of container. It spawns with  whatever is in there and that's it?
#59
Hey All,

Once again I have a question regarding scripting. In this script I'm creating a container with:
        var id = generator.AddContainer(system_id, coords.x, coords.y, "crate_01", "droplist_prefab_cargo_01");

This successfully creates the container and it has an item from the droplist. Then I'm adding to the contents of the cointainer:
        generator.AddItemToSpecifiedContainer(id, "ore_glepsite", 100);

And am getting the following errors

Exception System.NullReferenceException: Object reference not set to an instance of an object.
   -------------------------stack-------------------------
   at rnA5O51oAmWki8OOWMc.aQgYqT15sxbFCsxqoXP.MKGC106AoI(String  , UInt16  , UInt32  )
   at AtomicTorch.SpaceRPG.Server.Scripting.GlobalScopes.ScopeGenerator.AddItemToSpecifiedContainer(Int32 container_id, String item_type, Int32 quantity)
   at binder_for_AtomicTorch.SpaceRPG.Server.Scripting.GlobalScopes.ScopeGenerator.AddItemToSpecifiedContainer(ScriptEngine , Object , Object[] )
   at Jurassic.Compiler.Binder.Call(ScriptEngine engine, Object thisObject, Object[] arguments)
   at Jurassic.Library.ClrFunction.CallLateBound(Object thisObject, Object[] arguments)
   at Jurassic.Library.FunctionInstance.CallWithStackTrace(String path, String function, Int32 line, Object thisObject, Object[] argumentValues)
   at LDTOnShipDestroyedHandler(ScriptEngine , Scope , Object , FunctionInstance , Object[] )
   at Jurassic.Library.UserDefinedFunction.CallLateBound(Object thisObject, Object[] argumentValues)
   at Jurassic.ScriptEngine.CallGlobalFunction(String functionName, Object[] argumentValues)
   at nU9kl611aPOvHoTVi1k.VbN3XJ1PDhia7P4WrTi.fKNZ6qRgJm(String  , Object  )


Any ideas,
-Loudent
#60
Yeah, I missed your replay because I was testing the PrintError vs Print theory