Jump to content

fordhamflash

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by fordhamflash

  1. Greetings - How do you get your window to stay on the screen without closing and able to "keep playing" the game with the Sector window onscreen? I've been reading and reading your script, but can't figure it out!
  2. I am trying to upload a mod but not having any luck. At first I was getting a message that there was no thumbnail - which was true. I then created a thumbnail. The directions say to place it "next to" the modinfo file which I assume means the same directory. But then I still receive the "no thumbnail" error message. I've tried both JPG and PNG formats. At one point I clicked "upload" and the entire mod "disappeared". It was still on my local computer, but no longer seen or recognized by the game. Any ideas? Thanks.
  3. I cannot figure out how to upload this mod to the workshop. In any event, here is my first official mod. It's actually part of a bigger project, but it can stand alone as well. You can use the mod to pick any type of torpedo you want -- select the Torpedo Type and the Warhead Type as well torpedo shaft. There is a lua for the data/scripts/commands folder, one for the data/scripts player folder and one for the data/scripts/lib folder. To run, type /torpedobuilder in the chat console. A torpedo icon will appear in the upper right. I will be posting a version where you can completely customize the torpedoes as well. TorpedoBuilder.zip
  4. I FIGURED IT OUT! I FIGURED IT OUT! WOO HOOO WOO HOOO I FIGURED IT OUT! I was actually re-writing the script to make a "lesser" functioning script in the meantime. I was looking at entitydbg.lua to look at formatting for labels and buttons, etc. I noticed some similar language in there dealing with adding and removing player scripts. There it was! So, player selected Torpedo Type & Warhead Type. Press of a button starts a function to put the combo box selection into a local variable and then pass that into a function to generate the torpedoes. Not sure if it's 100% correct, but I am now launching custom torpedoes. Watch out Galaxy!!! This is just the beginning of a small project, but I am attaching the lua file just in case my ramblings can help anyone in a similar spot. advancedcommands.txt
  5. Client and server logs... serverlog_2019-07-28_15-10-29.txt clientlog_2019-07-28_15-02-04.txt
  6. So I am basically working on a modified / customized version of the entitydbg script. I am trying to include an option for "custom torpedoes." Basically, a window with 1 combo box for torpedo type and another combo box for the warhead type and a button to build. Note: This uses a customized version of torpedogenerator.lua (advancedtorpedogenerator.lua). For the life of me, I cannot get this to work. I have LITERALLY spent an entire week working on this but I am missing something. Generating torpedoes themselves is not a problem IF the torpedo and warhead type are "hard-coded" into the command line. My problem occurs when trying to use the 2 pieces of information entered by the player into the combo boxes to generate torpedoes. Pressing the button starts a function that is supposed to generate the torpedos. No matter what I do or how I do it, the following problem occurs in the torpedo generating function: (1) Before I include the invokeServerFunction language, I have no problem getting the two variables from the combo box function to the torpedo generating function. (I am currently using global variables because I don't know how to pass local variables through the "createButton" string.) I am then able to generate the torpedoes. HOWEVER, THE TORPEDOES DON'T WORK. They don't fire. Upon restart of the game, the torpedoes are gone. It's as if it looks like they are going into the torpedo launcher but for some reason they really are not really there. Even if I "hard code" the torpedo type and warhead type, the torpedoes will NOT work after being generated. (2) Then I add the invokeServerFunction (making it callable). If I "hard code" the torpedo type and warhead type here, I CAN get the torpedoes to generate and work properly. However, if I use the combo boxes and enter the torpedo type and warhead type from the game window, I get an error message which says I am attempting to "index" the combo box variable (a nil value). This is driving me nuts. Seriously, if any of you would like to see a grown man cry, well here I am. I would be SO thankful for any help anyone can provide. I am attaching the following. Text versions of... modinfo.lua init.lua advancedcommands.lua advancedtorpedogenerator.lua Since there is a 4 attachment limit, I am attaching my most recent client and server logs to my reply. modinfo.txt init.txt advancedcommands.txt advancedtorpedogenerator.txt
  7. 2018-08-09 16-06-00| could not execute function 'FleetControlUi.updateClient' in '"data/scripts/entity/fleetcontrol/controlui.lua"': 2018-08-09 16-06-00| 2018-08-09 16-06-00| data/scripts/lib/fleetcontrol\common.lua:404: attempt to index global 'Co' (a nil value) 2018-08-09 16-06-00| stack traceback: 2018-08-09 16-06-00| data/scripts/lib/fleetcontrol\common.lua:404: in function 'getPlayerCrafts' 2018-08-09 16-06-00| data/scripts/entity/fleetcontrol/controlui.lua:2117: in function <data/scripts/entity/fleetcontrol/controlui.lua:2103 Did you guys ever figure out this error? I am having the EXACT same problem with a mod I am working on and for the life of me cannot figure the answer out. Thanks!
  8. So I have attached my two most recent client logs and server logs from tonight. Reading up on ECS was VERY helpful. At this point, I stil have the problem of the torpedo launcher not loading. In looking over the logs, it looks like "MY" torpedo generator is creating some type of object error while the ENTITYDBG generator does not. I suspect this explains the problem but is over my head at this time. Any help would be greatly appreciated. I think I'm on hour 184 on this little project of mine! clientlog_2019-07-24_02-43-53.txt clientlog_2019-07-24_00-06-58.txt serverlog_2019-07-24_02-44-11.txt serverlog_2019-07-24_02-40-08.txt
  9. Of course. Just a frustrating few days. So I went back and started reading about entity component systems basics. Clearly the source of my problems. I have figured out how to generate torpedoes and load up my ship no problem. I have made "custom torpedoes" which are a heck of a lot of fun. But I can only generate "pre-determined" combinations of torpedo types and warheads. So I am trying to create an interface where the player can select a torpedo type and warhead type and then build torpedoes. I think my struggles relate to the very nature of the entity component systems itself. (1) My lua file contains a function for a UI with combo boxes and build button. (2) My lua file contains a function for generating the torpedoes. Is each function a separate script which are attached to different objects? Is the entire lua file a single script that is attached to an object? To which object(s) are they attached and how the heck is that done? How do I get variables from one function to another? Anyway, I am going to continue to read on to try to get a better grasp on this.
  10. For the life of me, I cannot figure this out. Once I even get close to working, then the torpedo launcher stops working properly. So frustrating.
  11. I am having an impossible time with some of my mods. Seemed to be working before. Is there some sort of bug causing problems at this time???
  12. Also, when it seems that I get past the "callable" error, I am then getting a "nil value" in the function error. Basically, using the "debug" menu as a template, I've created a window with two combo boxes - one for torpedo type and the other for warhead type. torpedoBodyCombo = tab:createComboBox(Rect(vec2(100, 100), vec2(350, 125)), "onTorpedoBodySelect") torpedoWarheadCombo = tab:createComboBox(Rect(vec2(450, 100), vec2(700, 125)), "onTorpedoWarheadSelect") function AdvancedCommands.onTorpedoBodySelect() local torpedoBodyType = torpedoBodyCombo.selectedIndex + 1 print(torpedoBodyType) end function AdvancedCommands.onTorpedoWarheadSelect() local torpedoWarheadType = torpedoWarheadCombo.selectedIndex + 1 print(torpedoWarheadType) end function AdvancedCommands.onTorpedoBuildPressed() invokeServerFunction("onTorpedoBodySelect", "onTorpedoWarheadSelect") local torpedoBodyType = torpedoBodyCombo.selectedIndex + 1 local torpedoWarheadType = torpedoWarheadCombo.selectedIndex + 1 print(torpedoWarheadType) print(torpedoBodyType) local ship = Entity() local launcher = TorpedoLauncher(ship.index) if launcher == nil then return end local x, y = Sector():getCoordinates() local torpedo = AdvancedTorpedoGenerator.generate(x, y, nil, nil, torpedoWarheadType, torpedoBodyType) --for i = 1, 10 do launcher:addTorpedo(torpedo) --end end callable(AdvancedCommands, "onTorpedoBodySelect") callable(AdvancedCommands, "onTorpedoWarheadSelect")
  13. Just when I thought I was making a ton of progress - whammy! I keep getting the "command is uncallable from remote" error even though I have added callable(namespace."blah blah") command. Even when I try to make the function callable, I am still getting the uncallable error message and broken function. Any ideas?
  14. P.S. with a little modification, the above mod works like a champ in the current version.
  15. This is fantastic. Great job. I am really trying to create a user interface from which customized weapons can be made. I know nothing about this stuff so I am just teaching myself by reading as many relevant mods as I can. I pretty much have a handle on generating turrets, torpedoes and fighters. The user interface aspect is tough.
  16. This mod is a proof-of-concept to show modders, what and how to do weapon modding. It's quite dated (from March 2017!) and will be deprecated in 0.21[current Beta], where the weapon API has changed. For now it still works with 0.20. I may pick it back up, when the Modding-Workshop-Update (either 0.22 or 0.23) will hit So would this not work anymore? I'm just trying to learn enough to make my own custom weapons. I've had a bit of success but did read about some changes with the API. Honestly, I can't figure out what those changes are (because there's no sample mods for me to look through).
  17. In case anyone is interested, I managed to create custom coaxial weapons using this "customized" version of the mod: https://www.avorion.net/forum/index.php/topic,3748.html The command /INVENTORY MYTURRET allows you to create a customized turret by physically editing the inventory.lua file before running the command. At lines 213 and 214, add the following: --Make Turret A CoAxial Weapon item.coaxial = true This will make the weapon a coaxial weapon. If you want to go back to making turrets just add "--" at the beginning of line 214.
  18. Actually, I think I figured it out!!! But now the next question -- how to customize torpedos??????
  19. I would love something like this. But doesn't look like that posted code is currently working. I tried playing around with torpedos and got nowhere.
  20. Laserzwei - Can I ask you a fragen? I'm trying to figure out how to generate a custom coaxial weapon. Like I said in the prior post, I have pretty much figured out how to generate any type of custom turret. From I can tell, a coaxial weapon is pretty much a "toggle" (either true or false) and of course there are damage adjustments, etc. But I can't figure out how to "toggle" on the coaxial weapon. My coding background basically consists of writing games in BASIC back in high school (errr, 30+ years ago) so this is all a bit over my head, but fun to try to figure out.
  21. Ahhh! Well that explains how I got it to work on the computer at home, but not at work. Work? I didn't mean to say that. I definitely do NOT play this game at work. :)
  22. Bahhh! Great! I spent about 14 hours yesterday looking at all that code! I have now figured out how to generate any type of customized turret which is cool. I was going to work on fighters and torpedos as well. HUGE learning curve for me, but fun stuff. P.S. Your mods are awesome. Thanks.
  23. So I have been pouring over this information and the lua files. It seems that COAXIAL weapons are merely a type of "toggle" - GetWeaponsCoaxial or something like that. I am trying to figure out how to "toggle" that code so I can command a coaxial weapon into my inventory. Any thoughts?
  24. This is cool. Question. Is there any reason you couldn't add additional weapons? Plasma weapons, cannons, bolter, lightning, tesla, etc?
×
×
  • Create New...