Showing posts with label [:]. Show all posts
Showing posts with label [:]. Show all posts
Friday, April 13, 2012
[FA] Set regen to active while incomplete?
[:1]Is there any function I could call in the OnCreate script segment that would set a unit's regeneration rate to active, even if incomplete? Because I am thinking it would be neat to make a Cybran unit that uses "nanites" to auto-build itself and repair itself from damage.|||You could try self:SetRegenRate(amount), but I'm not sure that the unit will actually complete on its own, or even if hitpoints necessarily represent completion.
[FA] Blueprint changes at runtime
[:1]Hello,
I have 3 questions:
1. I would like to create a mod which increases unit strength of all units of one faction every ~5min. I know how I could make this at the beginning of the game. But I don't know how to make it repeat every 5min.
2. Is it possible to set the norush to a time longer than 20min with a mod?
3. And at last? How can I change an Anti-Air to a DirectFire Tower?
Thanks in advance.|||knittel|||BulletMagnet|||At first thanks for the answers, but I would like to know how i can change the no rush time to longer than 20 min.|||Extract the lua and search for yourself. It should be pretty simple to find - lobbyOptions.lua should contain some references to it.
Keep in mind that modding the NR timer options in the lobby cannot be done in a mod manager mod, and will require an .scd mod (like a lobby mod), and may cause desyncs with people that don't have it. It may also conflict with any existing lobby mods.
I have 3 questions:
1. I would like to create a mod which increases unit strength of all units of one faction every ~5min. I know how I could make this at the beginning of the game. But I don't know how to make it repeat every 5min.
2. Is it possible to set the norush to a time longer than 20min with a mod?
3. And at last? How can I change an Anti-Air to a DirectFire Tower?
Thanks in advance.|||knittel|||BulletMagnet|||At first thanks for the answers, but I would like to know how i can change the no rush time to longer than 20 min.|||Extract the lua and search for yourself. It should be pretty simple to find - lobbyOptions.lua should contain some references to it.
Keep in mind that modding the NR timer options in the lobby cannot be done in a mod manager mod, and will require an .scd mod (like a lobby mod), and may cause desyncs with people that don't have it. It may also conflict with any existing lobby mods.
[SC2-SOLVED] Get Exp. Gantries to build non-Exp. units
[:1]PROBLEM SOLVED: I needed to alter Research.lua, not the categories. Thanks, Mithy.
I am currently working on a merge mod that lets all Experimental land units get research upgrades. (Yes, the balancing will be a terror) However, it seems that the category
'EXPERIMENTAL' is mandatory for a unit that is built by an Exp. Gantry. However, if I leave the 'EXPERIMENTAL' category in my merged Exp. land units, then the game will not let them be upgraded, as the 'EXPERIMENTAL' category is also what stops units like the Megalith from being upgraded.
I want my mod to be AI compatible by changing nothing except for weather or not my Exp. units can accept upgrades. Does anyone know how I might be able to trick an Exp. Gantry into building non-'EXPERIMENTAL'-category Exp. units?|||I dont know about how, But I support this, could be cool :)|||You've got this backwards. You don't ever want to remove categories from units unless you are aware of all of the consequences of doing so (which would be VERY far-reaching in this case, and would completely break the AI, and any sim functions that look for units with EXPERIMENTAL category).
All you need to do is remove -EXPERIMENTAL from the affected buff/research categories in Research.lua.
Or, make new buff definitions for experimentals that give different bonus levels, and add those buff names to the Buffs table of each research item you want to affect experimentals, with the appropriate categories (in this case, inclusive of experimental, exclusive of TECH1 and/or TECH2).|||Mithy|||Because the DLC is already shadowing that file in z_lua_dlc1.scd. And the game has some kind of built-in recognition for its own .scd filenames that makes them have higher precedence than any others, so the .scd has to be replaced to change it.
Research is something that basically can't be modified without doing this, as all three of the core research+layout files are already shadowed.
Now, it is possible to use the support mod to sort-of hook Research.lua, but the only things you can change are things the lua uses - Buffs, CommandEnables, Shield, AbilityEnables, etc. There's no way to actually change any of the capitalized variables (e.g. CATS, COST, etc) in a hook, because the engine handles those internally, and the hooked version doesn't get used by the engine.
So, what you're trying to do basically requires a z_lua_dlc1.scd replacement, since removing EXPERIMENTAL from the units that have it would have pretty significant negative consequences.
Edit: Actually, it may be possible to bypass the category restriction by hooking OnResearchTechnology in AIBrain, looking for a custom category variable, and manually calling each affected unit's OnResearchedTechnologyAdded, pointing it to the appropriate research item. It shouldn't be too difficult, and I can probably walk you through this, if you're interested.|||Thanks, but no thanks. I don't know anything about LUA scripting, and only really know much about BP. files. I'll just stick with the more widely used z_lua replacement method. Thanks, though!
EDIT: Wait...how do I compress/encode my modified research.lua file?
It won't work when placed in there uncompressed/encoded.
I use 7zip software to read/write to SCD. files.|||I don't know if 7zip works for .scds. Winrar should always work uncompressed, and versions 4+ should work with Normal compression as well.|||Winrar it is then. I was sort of hoping to avoid that, since it's only a free trial offer, but I guess I'll take 45 days if it works better than what I have now. Thanks for the advice!
I am currently working on a merge mod that lets all Experimental land units get research upgrades. (Yes, the balancing will be a terror) However, it seems that the category
'EXPERIMENTAL' is mandatory for a unit that is built by an Exp. Gantry. However, if I leave the 'EXPERIMENTAL' category in my merged Exp. land units, then the game will not let them be upgraded, as the 'EXPERIMENTAL' category is also what stops units like the Megalith from being upgraded.
I want my mod to be AI compatible by changing nothing except for weather or not my Exp. units can accept upgrades. Does anyone know how I might be able to trick an Exp. Gantry into building non-'EXPERIMENTAL'-category Exp. units?|||I dont know about how, But I support this, could be cool :)|||You've got this backwards. You don't ever want to remove categories from units unless you are aware of all of the consequences of doing so (which would be VERY far-reaching in this case, and would completely break the AI, and any sim functions that look for units with EXPERIMENTAL category).
All you need to do is remove -EXPERIMENTAL from the affected buff/research categories in Research.lua.
Or, make new buff definitions for experimentals that give different bonus levels, and add those buff names to the Buffs table of each research item you want to affect experimentals, with the appropriate categories (in this case, inclusive of experimental, exclusive of TECH1 and/or TECH2).|||Mithy|||Because the DLC is already shadowing that file in z_lua_dlc1.scd. And the game has some kind of built-in recognition for its own .scd filenames that makes them have higher precedence than any others, so the .scd has to be replaced to change it.
Research is something that basically can't be modified without doing this, as all three of the core research+layout files are already shadowed.
Now, it is possible to use the support mod to sort-of hook Research.lua, but the only things you can change are things the lua uses - Buffs, CommandEnables, Shield, AbilityEnables, etc. There's no way to actually change any of the capitalized variables (e.g. CATS, COST, etc) in a hook, because the engine handles those internally, and the hooked version doesn't get used by the engine.
So, what you're trying to do basically requires a z_lua_dlc1.scd replacement, since removing EXPERIMENTAL from the units that have it would have pretty significant negative consequences.
Edit: Actually, it may be possible to bypass the category restriction by hooking OnResearchTechnology in AIBrain, looking for a custom category variable, and manually calling each affected unit's OnResearchedTechnologyAdded, pointing it to the appropriate research item. It shouldn't be too difficult, and I can probably walk you through this, if you're interested.|||Thanks, but no thanks. I don't know anything about LUA scripting, and only really know much about BP. files. I'll just stick with the more widely used z_lua replacement method. Thanks, though!
EDIT: Wait...how do I compress/encode my modified research.lua file?
It won't work when placed in there uncompressed/encoded.
I use 7zip software to read/write to SCD. files.|||I don't know if 7zip works for .scds. Winrar should always work uncompressed, and versions 4+ should work with Normal compression as well.|||Winrar it is then. I was sort of hoping to avoid that, since it's only a free trial offer, but I guess I'll take 45 days if it works better than what I have now. Thanks for the advice!
[SC2] make the kraken go on land
[:1]Topic is pretty self explanatory, Is it possible to mod the kraken to be able to go on land? Thanks to anyone who can help.|||If you want to totally re-model the unit mesh, texture the new parts, articulate animations for it, and completely overhaul both the BP and script to transform and walk, then sure.|||Mithy|||You would still have to flatten the bottom of the mesh, and probably adjust its main bone's offset so that it doesn't clip way into the terrain (or float way above it). It's also a very long unit, and wouldn't translate well to hovering over varied terrain, ramps, etc. And its tentacles would still trail out behind it as though it were underwater.|||I dont really mind about the model and how it will clip into the terrain. I'm just considering either making it a cybran land unit that can go in water or leave it as a naval unit, If the ai is able to tell it to go on land. I'll have to see for the length of the unit, maybe change its colision size to make it a box, around the main body part? Thanks for your feedback Mithy, any help on this will do. I just want to keep it as simple as that if it is possible.|||A unit's collision box doesn't affect how it moves over terrain, just how projectiles collide with it.
As for 'as simple as possible', look at how the Cybran ship blueprints and scripts vary from the UEF ones, including which classes they inherit from. I don't have the differences memorized, so you're on your own.|||Thanks for the feedback
As for 'as simple as possible', look at how the Cybran ship blueprints and scripts vary from the UEF ones, including which classes they inherit from. I don't have the differences memorized, so you're on your own.|||Thanks for the feedback
(FA) Resizing projectiles with a Unit script?
[:1]I was wondering, a New Unit I am making uses some Stock Projectiles, but they are too small for that particular Unit. Anyone know how to resize the projectiles for that unit only via unit script?|||Projectiles aren't typically one thing - they're a bunch of different emitters, and sometimes a mesh. One way or another, you would have to hook the projectile script to handle scaling of the projectile's emitters/trails/etc, and the only thing you can really scale from the unit script is the mesh (if any) using proj:SetDrawScale().|||So I couldnt use a script to resize a beam projectile? If I hooked the projectile itself, it would alter the projectile for all the units using it...|||There is no such thing as a beam projectile. lol. Weapons fire beams, or projectiles.
brandon007|||You could hook the projectile's script, providing class variables for each of the emitter tables it creates. This would leave the projectile at normal scale by default, but the weapon classes in your unit script can then use those emitter references to do ScaleEmitter calls after projectile creation.
However, at that point, you may as well just copy the projectile script+bp, and update any mesh references in the bp to point to the original location.
brandon007|||You could hook the projectile's script, providing class variables for each of the emitter tables it creates. This would leave the projectile at normal scale by default, but the weapon classes in your unit script can then use those emitter references to do ScaleEmitter calls after projectile creation.
However, at that point, you may as well just copy the projectile script+bp, and update any mesh references in the bp to point to the original location.
[SOLVED] How do I package my modded research.lua file?
[:1]SOLVED, I was using the wrong program, and I needed to package it differently
I have taken the research.lua file from z_uncompiled_lua_dlc1 and edited it,
and then placed it in z_lua_dlc1 using winzip with both the zip. and zipx. compression
set to 0%. however, each time I try to test out my research mod, the game crashes!
Could someone give me a walk-through on how to get the compressed lua files to accept my edited, uncompressed ones?|||Are you using Winzip or WinRAR? Very different things - Winzip definitely does not work, while WinRAR does (although I've experienced some occasional rejection when editing an existing .scd).
Also, make sure you're using an un-edited Research.lua to start with, to confirm that the problem is actually the .scd packing and not a mistake within the file. Once you get that working, then substitute it with a modified version.|||Oops, I seem to have been an idiot...
Off to install WinRAR...
WinRAR installed. Now if only it would work.
I went ahead and did a test for whether or not it would work, and it does not. I backed up z_lua_DLC1.scd and replaced it with one where I merged an uncompiled research.lua file from z_uncompiled_lua_DLC1.scd into my copy of z_lua_DLC1.scd with the compression set to store. And yet when I ran the game, it crashes when I start loading a skirmish match!|||Like I said, it can sometimes be finicky when you're using an existing .scd. Try using normal compression, and re-try it several times, and/or delete the existing file before dragging the new one in.|||You can also try using the *unmodified* version of the file from z_uncompiled_lua_dlc1.scd and just put that into z_lua_dlc1.scd to test if it crashes, i.e., if the problem is with WinRAR. If the problem is with WinRAR, then you can try using the stable release and not a beta release, if that's the case. I remember Mithy was having problems when he was using a beta release. I've been using stable v4.00 and have never had a problem when setting the compression method to store. Any crashes I got were from modding syntax errors.|||Well, my WinRAR installer is labeled wrar400, so I'm assuming that would be WinRAR 4.0.
And I already tried replacing the encoded research.lua file with an un-coded one.
I tried using both the 'Store' and 'Normal' compression methods, and each time I deleted the old research.lua before moving the new one in. However, the game still crashes whenever I try to load a skirmish.
Meh, who knows what's going on, I guess I'll just blame my Windows Vista.|||Another thing to try (that I don't recall working for me, but has for other people e.g. the CBP) would be fully extracting the original .scd, replacing the file in that folder, and re-compressing it with either store or normal.
I'm not really sure how some people can get this on the first go, but when I've tried it, it took a bunch of attempts, and even using the same method the second time didn't work. Like I said, the game's really finicky about its .scd format.|||Mithy, Madface, thank you so much for your endless patience with me.
It finally worked! Thanks!
I have taken the research.lua file from z_uncompiled_lua_dlc1 and edited it,
and then placed it in z_lua_dlc1 using winzip with both the zip. and zipx. compression
set to 0%. however, each time I try to test out my research mod, the game crashes!
Could someone give me a walk-through on how to get the compressed lua files to accept my edited, uncompressed ones?|||Are you using Winzip or WinRAR? Very different things - Winzip definitely does not work, while WinRAR does (although I've experienced some occasional rejection when editing an existing .scd).
Also, make sure you're using an un-edited Research.lua to start with, to confirm that the problem is actually the .scd packing and not a mistake within the file. Once you get that working, then substitute it with a modified version.|||Oops, I seem to have been an idiot...
Off to install WinRAR...
WinRAR installed. Now if only it would work.
I went ahead and did a test for whether or not it would work, and it does not. I backed up z_lua_DLC1.scd and replaced it with one where I merged an uncompiled research.lua file from z_uncompiled_lua_DLC1.scd into my copy of z_lua_DLC1.scd with the compression set to store. And yet when I ran the game, it crashes when I start loading a skirmish match!|||Like I said, it can sometimes be finicky when you're using an existing .scd. Try using normal compression, and re-try it several times, and/or delete the existing file before dragging the new one in.|||You can also try using the *unmodified* version of the file from z_uncompiled_lua_dlc1.scd and just put that into z_lua_dlc1.scd to test if it crashes, i.e., if the problem is with WinRAR. If the problem is with WinRAR, then you can try using the stable release and not a beta release, if that's the case. I remember Mithy was having problems when he was using a beta release. I've been using stable v4.00 and have never had a problem when setting the compression method to store. Any crashes I got were from modding syntax errors.|||Well, my WinRAR installer is labeled wrar400, so I'm assuming that would be WinRAR 4.0.
And I already tried replacing the encoded research.lua file with an un-coded one.
I tried using both the 'Store' and 'Normal' compression methods, and each time I deleted the old research.lua before moving the new one in. However, the game still crashes whenever I try to load a skirmish.
Meh, who knows what's going on, I guess I'll just blame my Windows Vista.|||Another thing to try (that I don't recall working for me, but has for other people e.g. the CBP) would be fully extracting the original .scd, replacing the file in that folder, and re-compressing it with either store or normal.
I'm not really sure how some people can get this on the first go, but when I've tried it, it took a bunch of attempts, and even using the same method the second time didn't work. Like I said, the game's really finicky about its .scd format.|||Mithy, Madface, thank you so much for your endless patience with me.
It finally worked! Thanks!
Resizing Units ?
[:1]What file do I need to change in order to make any unit bigger or smaller ?|||for supreme commander\forged alliance:
you open the blueprint of whatever unit you want to change, and type in a new value in "UniformScale = "
keep in mind, changing units with walking animations will require you to change animation walk speed as well, as it will look strange once you change the uniformscale.
Im not sure if its the same in Supcom2.|||Also helps to post in the correct sub-forum.
Thread Moved to Mod Dev Support.
Mike|||There are a bunch of things that need to be changed in each unit's blueprint that affect visual size, collision size, footprint, and animation rate. I'd recommend looking at an actual scale mod for FA or SC2 and noting which values it modifies in each blueprint using Blueprints.lua, because I don't have them memorized offhand (and I doubt anyone else does either).
you open the blueprint of whatever unit you want to change, and type in a new value in "UniformScale = "
keep in mind, changing units with walking animations will require you to change animation walk speed as well, as it will look strange once you change the uniformscale.
Im not sure if its the same in Supcom2.|||Also helps to post in the correct sub-forum.
Thread Moved to Mod Dev Support.
Mike|||There are a bunch of things that need to be changed in each unit's blueprint that affect visual size, collision size, footprint, and animation rate. I'd recommend looking at an actual scale mod for FA or SC2 and noting which values it modifies in each blueprint using Blueprints.lua, because I don't have them memorized offhand (and I doubt anyone else does either).
FA] How do you create a faction?
[:1]I really would like to know what .lua's do you have to edit or creat a new copy to create a faction. I already have some models and the coding set up for that but I want them to be on a new team because they don't match any of the existing teams.|||Congratulations on picking the most complex task possible in FA modding. Notice how there are exactly zero custom faction mods downloadable right now, 4 years after the game's release.
It's possible, but it requires a ton of work, and you'll have to be willing to learn all about the internals of the game, and you'll need some reasonable programming ability. Having someone tell you which files to modify isn't realistic, as there are dozens upon dozens, and you'd have to know what you're doing with them. This isn't a copy-and-paste kind of thing.
If you're still willing to try, brute51 made a faction-add support mod that allows multiple added factions to co-exist if proper hooking methods are used, and makes a few parts of adding a faction a little bit easier (but not a whole lot, as that's not its goal). Did a bit of searching, and found it: http://supremecommander.filefront.com/f ... _mod;93767|||I was planning to make a very simple faction that only has T1. Then on my lesiure I would add the other tech levels.|||There is no 'very simple faction' from an integration standpoint. The bulk of the difficulty is in actually adding a faction, not in coding the units themselves-- although that takes time as well. Like I said, note how there are zero downloadable factions right now. Nobody's actually ever done this (although one mod is getting close to completion after.. uh.. 3 years), because of the amount of work involved.|||There was this one custom faction with only seven units and used a mech marine as a acu. It worked fine except the models were not custom and the ai did not use it.|||Then use that as a starting point? It probably wasn't set up to co-exist with other faction mods, and may not even clearly hook the right things, (i.e. it may have all the right files hooked, but you might not be able to tell what it changed by looking at them), but at least it should show you which files were changed. Referring to that and brute's faction support mod is about as easy as the whole process is going to get.|||It was made for sc1 not fa and it is setup to be the fourth faction not the fifth. I tried to edit it once but I missed something because the game froze during the loading screen.|||FA changed a ton of the underlying game structure, so yeah, that mod is probably useless.
And if all you're going by is "crashes or doesn't crash", you're gonna have a hell of a time getting any kind of mods working, nevermind a whole custom faction. You need to learn to use the log, and get some experience debugging simpler problems before you dive head first into creating a new faction.|||I still will try to create a faction since I've got a plan but I will have to experiment with the game files...|||Mithy pretty much summed up the extent of custom faction support efforts on these forums... The most successful attempt at a faction mod to date is the 80% complete Nomads faction which currently is a mostly abandoned project (That status after I think about 3+ years of work on it by the original team). I believe Brute is still working on some aspect of it but he is the only one.
The last version of it that I still have which is the original state it was in when its original mod team turned it over to this community something like a year ago is:
6,211 Files
2,385 Folders
424MB Size
Thats a heck of alot of work and the never finished up T3 & Experimental tech level. If you just strip it down to the core files (excluding custom units, projectiles, textures, & effects) you still end up with 68 modified or custom lua files. Unfortunatly due to the original teams destructive overrite coding style (they rewrote the whole file rather than hooking it) the only way to see what they changed to make it work is to compare each of those to the original & then hope you understand lua enough to make sence of it... Even with decent understanding of lua they cover every thing from simple functions to very badly coded UI elements (Sorry but GPG wasn't as neat in some areas as they coulda been).
I don't know what you history with modding is and considering how new you are its hard for people to take a faction project seriously without knowing. Alot of modders these days take "new faction" idea or mod threads as a joke simply because the author is usually over ambitous and tends to burn themselves out once they realize the work involved & that those of us willing to help new coders will not write scripts for them. Sad but true
Hope I don't sound like I am trying to shoot you down but this is one of those types of projects that even I can't be encouraging on.
|||Yep, like I said, you're going to need to be very, very determined and willing to slog through dozens of hours of troubleshooting, experimentation, and learning just getting a faction working in the interface, nevermind actually doing anything with that faction-- which can represent hundreds of hours, even if you're just planning on adding T1 (which won't be a playable faction anyway - who would pick a T1-only faction in FA?).
Keep in mind that we've seen this exact post about 50 times in the last 2-3 years - and where are all of those faction mods? None of them even got off the ground. Once each person realized the scale and difficulty of what they were getting into, they quietly gave up. This isn't something that one person alone can do, and nobody ever wants to compromise on their perfect vision for a faction and recruit any of the other people who have their own completely different vision for a faction, so they never happen.|||I have seen all these factions fail too because I have monitored the progress of almost all the new faction mod ideas and suggestions. They all seemed like they may be the first to succeed until they realized the workload or there was a disagreement or maybe just ran out of time. I understand why you can't put your faith in a person who just comes out of the blue saying they want to create a new mod because they may not know what they're getting into or they want others to do all the modeling and scripting for them so that they don't have to lift a finger. All I want is advice on which folders need to be modified and I don't care how much work I'm getting into. If no one knows then I just have a lot of backbreaking work ahead of me...|||Well, if anyone knows, it would probably be brute51 - you can try pming him, to see if he has an updated version of his faction support mod, or you might try posting in the Nomads thread in Mod Talk, as he's taken over development of that faction.|||If you just want to know how to create a custom faction, it isn't that hard as long as you are willing do make a mod that doesn't work along with the mod managers (though it might work with that faction support mod, never tried it).
Here is an example that worked for me if I put the scd file in my gamedata directory. The file adds two small factions, so hopefully it is helpful -- assuming any of the latest patches hasn't messed it up horribly.
http://www.mts.net/~Chirmaya/CodeGeassV3.rar
Feel free to contact me at chirmaya@mts.net, as I am rarely on these forums anymore.|||That actually did help thanks.
Also it does work with the latest patch.
It's possible, but it requires a ton of work, and you'll have to be willing to learn all about the internals of the game, and you'll need some reasonable programming ability. Having someone tell you which files to modify isn't realistic, as there are dozens upon dozens, and you'd have to know what you're doing with them. This isn't a copy-and-paste kind of thing.
If you're still willing to try, brute51 made a faction-add support mod that allows multiple added factions to co-exist if proper hooking methods are used, and makes a few parts of adding a faction a little bit easier (but not a whole lot, as that's not its goal). Did a bit of searching, and found it: http://supremecommander.filefront.com/f ... _mod;93767|||I was planning to make a very simple faction that only has T1. Then on my lesiure I would add the other tech levels.|||There is no 'very simple faction' from an integration standpoint. The bulk of the difficulty is in actually adding a faction, not in coding the units themselves-- although that takes time as well. Like I said, note how there are zero downloadable factions right now. Nobody's actually ever done this (although one mod is getting close to completion after.. uh.. 3 years), because of the amount of work involved.|||There was this one custom faction with only seven units and used a mech marine as a acu. It worked fine except the models were not custom and the ai did not use it.|||Then use that as a starting point? It probably wasn't set up to co-exist with other faction mods, and may not even clearly hook the right things, (i.e. it may have all the right files hooked, but you might not be able to tell what it changed by looking at them), but at least it should show you which files were changed. Referring to that and brute's faction support mod is about as easy as the whole process is going to get.|||It was made for sc1 not fa and it is setup to be the fourth faction not the fifth. I tried to edit it once but I missed something because the game froze during the loading screen.|||FA changed a ton of the underlying game structure, so yeah, that mod is probably useless.
And if all you're going by is "crashes or doesn't crash", you're gonna have a hell of a time getting any kind of mods working, nevermind a whole custom faction. You need to learn to use the log, and get some experience debugging simpler problems before you dive head first into creating a new faction.|||I still will try to create a faction since I've got a plan but I will have to experiment with the game files...|||Mithy pretty much summed up the extent of custom faction support efforts on these forums... The most successful attempt at a faction mod to date is the 80% complete Nomads faction which currently is a mostly abandoned project (That status after I think about 3+ years of work on it by the original team). I believe Brute is still working on some aspect of it but he is the only one.
The last version of it that I still have which is the original state it was in when its original mod team turned it over to this community something like a year ago is:
6,211 Files
2,385 Folders
424MB Size
Thats a heck of alot of work and the never finished up T3 & Experimental tech level. If you just strip it down to the core files (excluding custom units, projectiles, textures, & effects) you still end up with 68 modified or custom lua files. Unfortunatly due to the original teams destructive overrite coding style (they rewrote the whole file rather than hooking it) the only way to see what they changed to make it work is to compare each of those to the original & then hope you understand lua enough to make sence of it... Even with decent understanding of lua they cover every thing from simple functions to very badly coded UI elements (Sorry but GPG wasn't as neat in some areas as they coulda been).
I don't know what you history with modding is and considering how new you are its hard for people to take a faction project seriously without knowing. Alot of modders these days take "new faction" idea or mod threads as a joke simply because the author is usually over ambitous and tends to burn themselves out once they realize the work involved & that those of us willing to help new coders will not write scripts for them. Sad but true
Hope I don't sound like I am trying to shoot you down but this is one of those types of projects that even I can't be encouraging on.
Keep in mind that we've seen this exact post about 50 times in the last 2-3 years - and where are all of those faction mods? None of them even got off the ground. Once each person realized the scale and difficulty of what they were getting into, they quietly gave up. This isn't something that one person alone can do, and nobody ever wants to compromise on their perfect vision for a faction and recruit any of the other people who have their own completely different vision for a faction, so they never happen.|||I have seen all these factions fail too because I have monitored the progress of almost all the new faction mod ideas and suggestions. They all seemed like they may be the first to succeed until they realized the workload or there was a disagreement or maybe just ran out of time. I understand why you can't put your faith in a person who just comes out of the blue saying they want to create a new mod because they may not know what they're getting into or they want others to do all the modeling and scripting for them so that they don't have to lift a finger. All I want is advice on which folders need to be modified and I don't care how much work I'm getting into. If no one knows then I just have a lot of backbreaking work ahead of me...|||Well, if anyone knows, it would probably be brute51 - you can try pming him, to see if he has an updated version of his faction support mod, or you might try posting in the Nomads thread in Mod Talk, as he's taken over development of that faction.|||If you just want to know how to create a custom faction, it isn't that hard as long as you are willing do make a mod that doesn't work along with the mod managers (though it might work with that faction support mod, never tried it).
Here is an example that worked for me if I put the scd file in my gamedata directory. The file adds two small factions, so hopefully it is helpful -- assuming any of the latest patches hasn't messed it up horribly.
http://www.mts.net/~Chirmaya/CodeGeassV3.rar
Feel free to contact me at chirmaya@mts.net, as I am rarely on these forums anymore.|||That actually did help thanks.
Also it does work with the latest patch.
[FA]Subs with Fuel
[:1]Hi, I'm trying to make subs that would only stay underwater for awhile before "running out of fuel" and have to surface to recharge fuel. I tried adding fuelusetime and fuelrechargerate parameters to a sub blueprint. The result being that subs would use fuel when surfaced and start recharging fuel when underwater, which is the opposite of what I want. Any ideas on how to flip it?|||Well... I don't have your solution but i do have several questions.
1) Assuming that subs have to surface to "refuel" how would this be done? Would the player have to manually force the sub to surface or would it be automatic? Keep in mind that this would add allot to the micro management... I.E. This would make the naval units which already suck, suck more.
2) Assuming that a race is smart enough to travel through space, create an army on the fly and conquer other planets... Why would such a race need "fuel" in the first place? Yes, i know air units have fuel but that was done as a balancing tool on GPG's part not that it fits the races at all.
Resin|||WiseHero|||That would just make it instantly slow down whenever it goes underwater and regenerates a point of fuel, and would make it so that you would have to run it on the surface until the fuel ran out before it sped up.
Fuel drain is handled by the engine, so I doubt you'll be able to do this using the built-in fuel system. You'll have to manually script it using OnLayerChange, updating the fuel bar with SetWorkProgress.|||Hi,
Agreed, what mithy says is correct as usual :)
not to hard to impliment a quick system to handle this.|||@Resin Smoker: 1)I don't actually think that's relevant for now. If I can auto-surface the sub I'd definitely do it.
2)I know. Let's just not argue about it first.
Yeah I think I came to the same conclusion that fuel drain is handled by the engine. Guess I'll have to script it myself.
1) Assuming that subs have to surface to "refuel" how would this be done? Would the player have to manually force the sub to surface or would it be automatic? Keep in mind that this would add allot to the micro management... I.E. This would make the naval units which already suck, suck more.
2) Assuming that a race is smart enough to travel through space, create an army on the fly and conquer other planets... Why would such a race need "fuel" in the first place? Yes, i know air units have fuel but that was done as a balancing tool on GPG's part not that it fits the races at all.
Resin|||WiseHero|||That would just make it instantly slow down whenever it goes underwater and regenerates a point of fuel, and would make it so that you would have to run it on the surface until the fuel ran out before it sped up.
Fuel drain is handled by the engine, so I doubt you'll be able to do this using the built-in fuel system. You'll have to manually script it using OnLayerChange, updating the fuel bar with SetWorkProgress.|||Hi,
Agreed, what mithy says is correct as usual :)
not to hard to impliment a quick system to handle this.|||@Resin Smoker: 1)I don't actually think that's relevant for now. If I can auto-surface the sub I'd definitely do it.
2)I know. Let's just not argue about it first.
Yeah I think I came to the same conclusion that fuel drain is handled by the engine. Guess I'll have to script it myself.
AI for new Faction? (FA)
[:1]Ello. I have been working on a new Expansion for FA, and it has a new faction. Its all working, except when the New faction ACU is spawned, it just stands there and does nothing...
Anyone got an idea on what to do?|||your gonna have to get sorians, aand read his readme pal on how to add the ai for each of your units..|||I don't think what Domino says is needed. That is only true for new individual units belonging to one of the 4 stock factions, not for a whole new faction.
You're gonna have to edit a bunch of files that contain unit blueprint ID's and add the ones for your faction. It's a whole lot of work but if you do it right the AI playing your faction works nicely. The ACU starts building stuff, engineers roll from the factory, etc.
This is how it's done in Nomads. There is one major problem in Nomads though, after about 3 to 8 minutes (depending on AI, Sorian = 3, regular =
the game crashes. I think this is the point where the AI starts upgrading a mex. I don't know any other faction mod that got the AI working so I can't say this is a bug in Nomads or that it's an FA bug.|||Thats the problem though, I dont even know which files to edit, and what I need to change... T_T|||Here's a list of files that I remember changing for the AI. Since the Nomad AI isn't "perfect" (see prev post) I'm not sure this list is complete, but it's a start.
- all files in \lua\AI\PlatoonTemplates
- FactoryBuilderManager.lua in \lua\sim
- aibrainPlans.lua, basetemplates.lua, BuildingTemplates.lua, platoontemplates.lua in \lua
Another tip; use a text editor with a good search function in it that lets you search in files. Then have it search for "seraphim" (not case sensitive). Check each result to see if you need to add something for your own faction. Keep in mind that sometimes factions are not refered to by their name (UEF, Aeon, etc) but by the number as the factions are defined in the factions table, in factions.lua. This means that your faction could be '5', the Seraphim are '4' and the UEF are '1'. You could try to search for references to these numbers aswell...|||By the way, changing the mentioned files might not work well with Sorian and Duncanes AI's. Test whether it works with all custom made AI's disabled. Once you got it working it's time to see if you can get it working with Sorians and Duncanes AI's.|||I made the alterations to the mentioned files. Problem is, When they get used, the game crashes right away X-x I am pretty sure I did the files right, but apparently not X-x|||So start over, test a handful of changes at a time, and watch the log, so you know what's causing problems.|||Sounds like the same problem I'm having with Nomads... If you find a sollution let me know!
So far I didn't really mind about the AI not working, there are other areas to do first. I'll dig into it later, maybe then I can get it working fully.|||Mithy, in my case there is nothing useful in the log. Even having the game write to a log file gives no result. The next step is to put a lot of LOG()-s throughout the AI system but like I said I haven't done that yet and I won't dig into it any time very soon.|||Poo, I need to find the solution, and get the AI fully functional before I can release =o Wheres Sorian when ya need him? XD|||Hi,
The Problem might not be related to the AI code itself..
we all know that i found the bug that crashed 4dc..
this was caused by AI games... however the error was not in the AI itself..
when human players were playing with 4dc with no ai the game would not crash..
but with an ai the game would crash when units get to t3 level... or just after to be exact.. there was no inidication at all in any logs...
The problem was actually a units script calling a function that doesnt exist..
this is what crashed the game for the AI, as soon as this rogue unit script function call was commented out, no more crashing, its something to check in all your units scripts.. that they are not calling something that doesnt exist.
it may well be another error.. but this is what it was for 4dc.|||Domino|||Hi,
brandon007|||I completely forgot about that issue you had with 4DC. Nice to see you fixed it! It must have been some strange function call if the game didn't throw out an error that says function xyz doesn't exist. Can you elaborate a bit?
Anyone got an idea on what to do?|||your gonna have to get sorians, aand read his readme pal on how to add the ai for each of your units..|||I don't think what Domino says is needed. That is only true for new individual units belonging to one of the 4 stock factions, not for a whole new faction.
You're gonna have to edit a bunch of files that contain unit blueprint ID's and add the ones for your faction. It's a whole lot of work but if you do it right the AI playing your faction works nicely. The ACU starts building stuff, engineers roll from the factory, etc.
This is how it's done in Nomads. There is one major problem in Nomads though, after about 3 to 8 minutes (depending on AI, Sorian = 3, regular =
- all files in \lua\AI\PlatoonTemplates
- FactoryBuilderManager.lua in \lua\sim
- aibrainPlans.lua, basetemplates.lua, BuildingTemplates.lua, platoontemplates.lua in \lua
Another tip; use a text editor with a good search function in it that lets you search in files. Then have it search for "seraphim" (not case sensitive). Check each result to see if you need to add something for your own faction. Keep in mind that sometimes factions are not refered to by their name (UEF, Aeon, etc) but by the number as the factions are defined in the factions table, in factions.lua. This means that your faction could be '5', the Seraphim are '4' and the UEF are '1'. You could try to search for references to these numbers aswell...|||By the way, changing the mentioned files might not work well with Sorian and Duncanes AI's. Test whether it works with all custom made AI's disabled. Once you got it working it's time to see if you can get it working with Sorians and Duncanes AI's.|||I made the alterations to the mentioned files. Problem is, When they get used, the game crashes right away X-x I am pretty sure I did the files right, but apparently not X-x|||So start over, test a handful of changes at a time, and watch the log, so you know what's causing problems.|||Sounds like the same problem I'm having with Nomads... If you find a sollution let me know!

So far I didn't really mind about the AI not working, there are other areas to do first. I'll dig into it later, maybe then I can get it working fully.|||Mithy, in my case there is nothing useful in the log. Even having the game write to a log file gives no result. The next step is to put a lot of LOG()-s throughout the AI system but like I said I haven't done that yet and I won't dig into it any time very soon.|||Poo, I need to find the solution, and get the AI fully functional before I can release =o Wheres Sorian when ya need him? XD|||Hi,
The Problem might not be related to the AI code itself..
we all know that i found the bug that crashed 4dc..
this was caused by AI games... however the error was not in the AI itself..
when human players were playing with 4dc with no ai the game would not crash..
but with an ai the game would crash when units get to t3 level... or just after to be exact.. there was no inidication at all in any logs...
The problem was actually a units script calling a function that doesnt exist..
this is what crashed the game for the AI, as soon as this rogue unit script function call was commented out, no more crashing, its something to check in all your units scripts.. that they are not calling something that doesnt exist.
it may well be another error.. but this is what it was for 4dc.|||Domino|||Hi,
brandon007|||I completely forgot about that issue you had with 4DC. Nice to see you fixed it! It must have been some strange function call if the game didn't throw out an error that says function xyz doesn't exist. Can you elaborate a bit?
[SC2] Why is the Mastodon's foremost SAM disabled?
[:1]I've noticed on my copy of SC2 that the Mastodon's foremost SAM launcher does not fire. Was this disabled by the designers, or do I have a mod enabled that is disabling it? The reason I have this in Mod Support is because I am currently developing a mod and am wondering if I have accidentally disabled the foremost SAM.|||did you touch the unit's script/BPs? or is a mod that you may be running touch it?|||I've altered research.lua a good amount, but I have not changed any upgrades that apply to battleships. I am also currently using the "cheats enabled" lua.scd replacement:
http://forums.gaspowered.com/viewtopic.php?t=44086
So I've been using that while testing my mod. I have also made extensive use of merge blueprints, but have only once merged the Mastodon's .bp itself. I have tried removing the merge.bp that includes the Mastodon, but it does not make any difference.
Also, my mod is DLC exclusive, but running it with DLC disabled does not make a difference.
EDIT: Wait, I was looking over the (unaltered) blueprint, and I noticed something, even though in the weapons section of the script there is both a Backturret01 and a Backturret02, both SAMs appear to load the default weapon Backturret02, and Backturret01 is never used. Could this be the problem? I'll go test that. But why would the designers do that in the first place?
http://forums.gaspowered.com/viewtopic.php?t=44086
So I've been using that while testing my mod. I have also made extensive use of merge blueprints, but have only once merged the Mastodon's .bp itself. I have tried removing the merge.bp that includes the Mastodon, but it does not make any difference.
Also, my mod is DLC exclusive, but running it with DLC disabled does not make a difference.
EDIT: Wait, I was looking over the (unaltered) blueprint, and I noticed something, even though in the weapons section of the script there is both a Backturret01 and a Backturret02, both SAMs appear to load the default weapon Backturret02, and Backturret01 is never used. Could this be the problem? I'll go test that. But why would the designers do that in the first place?
[FA] Need help with a pesky unit upgrade.
[:1]So, i'm working on a costum unit for FA. Pretty unique, T3 unit (should almost call it T3.5 heh) it's a pretty cheap and useless unit at first, then you upgrade it with either 2 utility upgrades, 2 base upgrades, and 2 offensive upgrades. Did most of them already. Aynway, i'd need help with 2 upgrades. One would be a classic weapon swap but this, for some reason, isn't working properly even though i followed the tutorial. The other upgrade i'd need help with is an upgrade that makes the unit's MaxSpeed higher (to whatever value i set it).
bp: http://pastebin.com/1xpvPMRH
script: http://pastebin.com/28BTXr1U
Anyone who can make my unit work gets a free cookie and a glass of milk (optional)|||Blueprint problems:
- The real weapons need PrefersPrimaryWeaponTarget = true
- The dummy weapon needs a damage value (as far as I'm aware)
- You shouldn't be firing 5 projectiles at once from the same muzzle (use salvos if you really feel it needs that many projectiles)
- The laser should not be RULEUBA_LowArc (use RULEUBA_None)
- All three weapons need Seabed in the source and destination of their FireTargetLayerCapsTable. All three will need AboveWaterTargetsOnly = true as well. This lets them fire to and from the shoreline, and at targets emerging from the water - otherwise their weapons will all be disabled when they approach the shoreline.
- Beam delay values should be multiples of 0.1, also remembering that BeamCollisionDelay has 0.1 added to it by the engine. This means BeamLifeTime needs to be at least BeamCollisionDelay + 0.1.
Script problems:
- CreateEnhancement should not be having to call RemoveUnitEnhancement on anything so long as you're using the blueprint RemoveEnhancements tables properly (which you appear to be doing)
- Your weapon switch enhancement isn't syncing up the two weapons' aim manipulators upon switchover, although that's non-critical (it should just result in a snap-back of the turret)
That said, I'm not sure why the weapon switch wouldn't work at all, assuming you've confirmed that the laser works when enabled alone in OnCreate. Without knowing specifically what problem you're having, I can't really give any more specific help.
For speed increases, use self:SetSpeedMult(mult) in CreateEnhancement. Set that to 1 to return the unit to default speed. You may also want to call SetTurnMult and SetAccMult with the same values, if you want to increase turn and acceleration rates accordingly.|||Alright, did everything you said (the weapons part anyway, will do the speed thing later.), except the multiple projectiles out of 1 muzzle, thats kind of a workaround because there wasnt a big enough gauss projectile so i made it fire 6 (hence the damage 500/5) so the resulting projectile looks bigger.
Anyway, now the error log thing reports this error in the script:
WARNING: ...supreme destruction\units\reu1337\reu1337_script.lua(15): access to nonexistent global variable "WeaponFile"
WARNING: stack traceback:
WARNING: [C]: in function `error'
WARNING: ...alliance\gamedata\mohodata.scd\lua\system\config.lua(53): in function <...alliance\gamedata\mohodata.scd\lua\system\config.lua:52>
WARNING: ...supreme destruction\units\reu1337\reu1337_script.lua(15): in main chunk
WARNING: [C]: in function `doscript'
WARNING: [C]: in function `pcall'
WARNING: ...alliance\gamedata\mohodata.scd\lua\system\import.lua(48): in function `import'
WARNING: Error importing /mods/supreme destruction/units/reu1337/reu1337_script.lua:
Error importing '/mods/supreme destruction/units/reu1337/reu1337_script.lua'
stack traceback:
[C]: in function `error'
...alliance\gamedata\mohodata.scd\lua\system\import.lua(52): in function `import'
INFO: Problems loading module '/mods/supreme destruction/units/reu1337/reu1337_script.lua'. Falling back to 'Unit' in '/lua/sim/unit.lua'.
Odd.
Oh btw, neither weapon fires before or after the upgrade.
new bp: http://pastebin.com/DxPXkhkq
new script: http://pastebin.com/JPduaBds|||That's because your script is failing due to a typo. I'm surprised the unit works at all. Your barebones weapon class is looking in 'WeaponFile', which doesn't exist - you only defined 'WeaponsFile'.
Edit: You're also referring to 'WeaponsFile' before it's even defined. You can't do that.|||And... umm... how would i fix that? Sorry but my knowlege of these scripts is pretty much 0... i only copied some stuff from other units' scripts and tweaked them just a bit.|||Did some random stuff and copy pasting, and now the unit is firing the upgrade weapon... i just can't seem to get this working, and i've been trying for like 2 hours... D:|||Well, you might want to learn some really basic programming concepts before doing things like combining scripts, or you'll be running into a lot of problems. Scripting is a lot more complex than blueprint editing, and there's a lot more that can go catastrophically wrong. 'Random stuff' is usually not going to solve any problems, and if you don't know why you're doing what you're doing, there's about a 99% chance it'll just make things worse.
Again, you need to at least list the exact problem you're having, and post an updated version of the script/bp - you just said the unit is firing the upgrade weapon, but that 'this isn't working' - we have no way of knowing what 'this' is, or in what way it isn't working.
I'm not trying to be harsh. It's just really, really difficult to troubleshoot someone else's work even when they show everything and describe the problems they're having in detail. Without any of that, there's no way for us to know what's wrong.|||Edit:
Got everything on the unit working (apart from the textures haha) only one more thing is wrong. The unit won't switch from the Autocannon upgrade to the Laser Gun upgrade, for some reason.
bp: http://pastebin.com/6vQsH64Q
script: http://pastebin.com/m3mi9Ppu|||You mean the laser upgrade doesn't work at all, or only when you already have the main gun upgrade installed?
You're still doing an extraneous RemoveUnitEnhancement in a bunch of the removal enhancements - at the very least, you do not need that, and it may even cause problems depending on the order in which things run. If your enhancements aren't being removed without that, then you're doing something else wrong that I'm just not seeing right now.|||Both upgrades work, i'm just saying that i can't switch from the autocannon upgrade to the laser upgrade.|||Oh. Your MainGun remove has the slot set to 'Back', rather than 'LCH'. It probably isn't being found by the UI code.
bp: http://pastebin.com/1xpvPMRH
script: http://pastebin.com/28BTXr1U
Anyone who can make my unit work gets a free cookie and a glass of milk (optional)|||Blueprint problems:
- The real weapons need PrefersPrimaryWeaponTarget = true
- The dummy weapon needs a damage value (as far as I'm aware)
- You shouldn't be firing 5 projectiles at once from the same muzzle (use salvos if you really feel it needs that many projectiles)
- The laser should not be RULEUBA_LowArc (use RULEUBA_None)
- All three weapons need Seabed in the source and destination of their FireTargetLayerCapsTable. All three will need AboveWaterTargetsOnly = true as well. This lets them fire to and from the shoreline, and at targets emerging from the water - otherwise their weapons will all be disabled when they approach the shoreline.
- Beam delay values should be multiples of 0.1, also remembering that BeamCollisionDelay has 0.1 added to it by the engine. This means BeamLifeTime needs to be at least BeamCollisionDelay + 0.1.
Script problems:
- CreateEnhancement should not be having to call RemoveUnitEnhancement on anything so long as you're using the blueprint RemoveEnhancements tables properly (which you appear to be doing)
- Your weapon switch enhancement isn't syncing up the two weapons' aim manipulators upon switchover, although that's non-critical (it should just result in a snap-back of the turret)
That said, I'm not sure why the weapon switch wouldn't work at all, assuming you've confirmed that the laser works when enabled alone in OnCreate. Without knowing specifically what problem you're having, I can't really give any more specific help.
For speed increases, use self:SetSpeedMult(mult) in CreateEnhancement. Set that to 1 to return the unit to default speed. You may also want to call SetTurnMult and SetAccMult with the same values, if you want to increase turn and acceleration rates accordingly.|||Alright, did everything you said (the weapons part anyway, will do the speed thing later.), except the multiple projectiles out of 1 muzzle, thats kind of a workaround because there wasnt a big enough gauss projectile so i made it fire 6 (hence the damage 500/5) so the resulting projectile looks bigger.
Anyway, now the error log thing reports this error in the script:
WARNING: ...supreme destruction\units\reu1337\reu1337_script.lua(15): access to nonexistent global variable "WeaponFile"
WARNING: stack traceback:
WARNING: [C]: in function `error'
WARNING: ...alliance\gamedata\mohodata.scd\lua\system\config.lua(53): in function <...alliance\gamedata\mohodata.scd\lua\system\config.lua:52>
WARNING: ...supreme destruction\units\reu1337\reu1337_script.lua(15): in main chunk
WARNING: [C]: in function `doscript'
WARNING: [C]: in function `pcall'
WARNING: ...alliance\gamedata\mohodata.scd\lua\system\import.lua(48): in function `import'
WARNING: Error importing /mods/supreme destruction/units/reu1337/reu1337_script.lua:
Error importing '/mods/supreme destruction/units/reu1337/reu1337_script.lua'
stack traceback:
[C]: in function `error'
...alliance\gamedata\mohodata.scd\lua\system\import.lua(52): in function `import'
INFO: Problems loading module '/mods/supreme destruction/units/reu1337/reu1337_script.lua'. Falling back to 'Unit' in '/lua/sim/unit.lua'.
Odd.
Oh btw, neither weapon fires before or after the upgrade.
new bp: http://pastebin.com/DxPXkhkq
new script: http://pastebin.com/JPduaBds|||That's because your script is failing due to a typo. I'm surprised the unit works at all. Your barebones weapon class is looking in 'WeaponFile', which doesn't exist - you only defined 'WeaponsFile'.
Edit: You're also referring to 'WeaponsFile' before it's even defined. You can't do that.|||And... umm... how would i fix that? Sorry but my knowlege of these scripts is pretty much 0... i only copied some stuff from other units' scripts and tweaked them just a bit.|||Did some random stuff and copy pasting, and now the unit is firing the upgrade weapon... i just can't seem to get this working, and i've been trying for like 2 hours... D:|||Well, you might want to learn some really basic programming concepts before doing things like combining scripts, or you'll be running into a lot of problems. Scripting is a lot more complex than blueprint editing, and there's a lot more that can go catastrophically wrong. 'Random stuff' is usually not going to solve any problems, and if you don't know why you're doing what you're doing, there's about a 99% chance it'll just make things worse.
Again, you need to at least list the exact problem you're having, and post an updated version of the script/bp - you just said the unit is firing the upgrade weapon, but that 'this isn't working' - we have no way of knowing what 'this' is, or in what way it isn't working.
I'm not trying to be harsh. It's just really, really difficult to troubleshoot someone else's work even when they show everything and describe the problems they're having in detail. Without any of that, there's no way for us to know what's wrong.|||Edit:
Got everything on the unit working (apart from the textures haha) only one more thing is wrong. The unit won't switch from the Autocannon upgrade to the Laser Gun upgrade, for some reason.
bp: http://pastebin.com/6vQsH64Q
script: http://pastebin.com/m3mi9Ppu|||You mean the laser upgrade doesn't work at all, or only when you already have the main gun upgrade installed?
You're still doing an extraneous RemoveUnitEnhancement in a bunch of the removal enhancements - at the very least, you do not need that, and it may even cause problems depending on the order in which things run. If your enhancements aren't being removed without that, then you're doing something else wrong that I'm just not seeing right now.|||Both upgrades work, i'm just saying that i can't switch from the autocannon upgrade to the laser upgrade.|||Oh. Your MainGun remove has the slot set to 'Back', rather than 'LCH'. It probably isn't being found by the UI code.
Unit Edditing Help
[:1]In a unit.bp file, under Catagories = {, if you take out the line 'Experimental', but leave it built by a tech 3 engineer, can you still build it if you exclude experimentals? Also, does it leave it under the experimental tab in game since you can't access that tab with the tech 4 restriction or does it drop it into the normal tech 3 unit selections to be buildable?
From looking at other units, I'd have to put 'Tech3', under catagories and then it should be fine correct?|||For future reference we have a slew of Subforums specifically for Modding
Just hop on to the index and scroll down.
Mike|||My bad, for some reason thought it should go here. Realize all editing questions should go under mod dev support now. Please move it for proper location if you need to.|||Once LD or one of hte Global mods comes around It will be moved.
Mike|||Moved.|||If you remove EXPERIMENTAL and add TECH3, it will behave entirely as a T3 unit as far as restrictions, AI, etc are concerned.|||Great, thanks for the help
From looking at other units, I'd have to put 'Tech3', under catagories and then it should be fine correct?|||For future reference we have a slew of Subforums specifically for Modding
Just hop on to the index and scroll down.
Mike|||My bad, for some reason thought it should go here. Realize all editing questions should go under mod dev support now. Please move it for proper location if you need to.|||Once LD or one of hte Global mods comes around It will be moved.
Mike|||Moved.|||If you remove EXPERIMENTAL and add TECH3, it will behave entirely as a T3 unit as far as restrictions, AI, etc are concerned.|||Great, thanks for the help
(SC2->FA) Tank treads?
[:1]Im attempting to port in a few Units from SC2 that have treads on them, and Im was wondering... How do I get the tread textures onto those units in FA?|||You would probably have to re-do the treads on the mesh, because the two games use mutually-exclusive tread systems. FA needs a contiguous bone to scroll a texture on, and SC2 needs an actual articulated tread mesh.
Once you have the treads re-made in FA style, there are some blueprint settings in Display that allow certain textures to scroll (look at the Fatboy).|||Mithy|||brandon007|||Mithy|||No, because that other mesh has its own UV map and its own texture. If you cut and paste a piece of an FA mesh into a new mesh, it won't have access to that texture / UV map. You'd have to re-texture the copy-pasted tread using the new mesh's texture.|||Mithy|||Are you just copying the texture from the stealth generator?|||Mithy
Once you have the treads re-made in FA style, there are some blueprint settings in Display that allow certain textures to scroll (look at the Fatboy).|||Mithy|||brandon007|||Mithy|||No, because that other mesh has its own UV map and its own texture. If you cut and paste a piece of an FA mesh into a new mesh, it won't have access to that texture / UV map. You'd have to re-texture the copy-pasted tread using the new mesh's texture.|||Mithy|||Are you just copying the texture from the stealth generator?|||Mithy
Modding The Game's Sound ?
[:1]What do I use to extract the sounds from the game and then after creating new ones how do I put them back so that the game will read them ?|||Mod talk is for talking about WIP or Released Mods, what your looking for is Mod Dev Support. A Mod will move this shortly.
Mike|||adamstrange|||Hi,
in this thread
http://forums.gaspowered.com/viewtopic.php?f=19&t=46143
near the bottom is a quick and dirty tutorial on making sound banks.
extracting the sounds is also rather easy, i use a tool called
unxwb google it :)
Mike|||adamstrange|||Hi,
in this thread
http://forums.gaspowered.com/viewtopic.php?f=19&t=46143
near the bottom is a quick and dirty tutorial on making sound banks.
extracting the sounds is also rather easy, i use a tool called
unxwb google it :)
[FA]Force an unit to go on surface when it have a target ?
[:1]Hi :)
I would to know if it is possible to force a sub unit to go on surface when the weapon have a target ?
Thanks|||Er, isn't that what auto-surface mode does? Right-click the surface button.|||Mithy|||That's just the UI code that handles turning auto mode on and off for the appropriate units in a group. It doesn't actually handle the auto-surfacing once turned on, that's all up to the engine.
I seem to recall auto-surfacing working for e.g. the Cybran T1 subs, but in the event that it doesn't, your only available option would be to manually check the current layer in the script against current weapon targets, and do an IssueClearCommands and then an IssueDive to force a surface.
This would clear any orders that unit had, however, including an attack order. There's also no small amount of difficulty to determining when a surface target is available. You'd need to create a dummy weapon with a valid script class that simply does no damage (blank out its OnFire), and can target surface targets from underwater, then use this weapon's OnGotTarget (which isn't 100% reliable, but works most of the time) to run a function that checks whether or not the unit's underwater weapons have targets, and if not, issues a surface. This is kind of messy and complicated, but it's really the only way to get a unit to auto-surface/dive if the built-in auto mode doesn't work.
The surface-targeting dummy weapon would probably need to be disabled while the unit is moving, otherwise if you gave it a normal move order underwater, it would immediately halt, surface, and start attacking if it encountered a surface target - basically, you'd totally lose control of the unit.|||ok thks :)
And a new question now
What determine the dive duration ?|||If you mean the time it takes to dive/surface when the command is issued, probably something in the unit's bp.Physics. I haven't actually timed it, but I think the Atlantis takes a bit longer to dive/surface than the T1 subs, so compare those two blueprints' Physics tables and experiment with some of the settings that are different between them.|||Hi,
Just some general info really,
This could be usefull for this type of thing,
in DMS v7 (not released yet), you can give a unit a "unit sensor" which detects units within the sensors range and updates the distance and unit detected via a function, you could use this sensor to make the sub surface when a unit on "layer" is detected ..|||That's not the difficult part, the difficult part is telling it when NOT to surface, otherwise you get a unit that's 100% uncontrollable and surfaces and attacks any time you try to move it near enemy surface units.
In my experience, trying to automatically issue orders is not something that will ever produce desirable results, because it requires reams of manual scripting (and performance-intensive checks) for every possible situation where you might not want the auto-order to occur. What if you want the sub to move silently past surface targets, instead of attacking them? You're SOL. You can try to base the auto-behavior on movement, but even then, you have to keep it moving non-stop (and not on a patrol) to keep it from auto-surfacing.
The only thing I can think to try would be to make the primary weapon the subsurface-to-surface dummy weapon, and give it whichever blueprint flag prevents it from auto-acquiring targets. If that flag actually works (I don't recall), you could make the sub surface by giving it an attack order on a surface target, but that might negatively impact its target behavior w/r/t sub-surface or water targets assuming it has torpedoes as well-- because those would no longer be the primary weapon, and it would have difficulty knowing which range to position itself at when given an attack order against sub targets.
I would to know if it is possible to force a sub unit to go on surface when the weapon have a target ?
Thanks|||Er, isn't that what auto-surface mode does? Right-click the surface button.|||Mithy|||That's just the UI code that handles turning auto mode on and off for the appropriate units in a group. It doesn't actually handle the auto-surfacing once turned on, that's all up to the engine.
I seem to recall auto-surfacing working for e.g. the Cybran T1 subs, but in the event that it doesn't, your only available option would be to manually check the current layer in the script against current weapon targets, and do an IssueClearCommands and then an IssueDive to force a surface.
This would clear any orders that unit had, however, including an attack order. There's also no small amount of difficulty to determining when a surface target is available. You'd need to create a dummy weapon with a valid script class that simply does no damage (blank out its OnFire), and can target surface targets from underwater, then use this weapon's OnGotTarget (which isn't 100% reliable, but works most of the time) to run a function that checks whether or not the unit's underwater weapons have targets, and if not, issues a surface. This is kind of messy and complicated, but it's really the only way to get a unit to auto-surface/dive if the built-in auto mode doesn't work.
The surface-targeting dummy weapon would probably need to be disabled while the unit is moving, otherwise if you gave it a normal move order underwater, it would immediately halt, surface, and start attacking if it encountered a surface target - basically, you'd totally lose control of the unit.|||ok thks :)
And a new question now
What determine the dive duration ?|||If you mean the time it takes to dive/surface when the command is issued, probably something in the unit's bp.Physics. I haven't actually timed it, but I think the Atlantis takes a bit longer to dive/surface than the T1 subs, so compare those two blueprints' Physics tables and experiment with some of the settings that are different between them.|||Hi,
Just some general info really,
This could be usefull for this type of thing,
in DMS v7 (not released yet), you can give a unit a "unit sensor" which detects units within the sensors range and updates the distance and unit detected via a function, you could use this sensor to make the sub surface when a unit on "layer" is detected ..|||That's not the difficult part, the difficult part is telling it when NOT to surface, otherwise you get a unit that's 100% uncontrollable and surfaces and attacks any time you try to move it near enemy surface units.
In my experience, trying to automatically issue orders is not something that will ever produce desirable results, because it requires reams of manual scripting (and performance-intensive checks) for every possible situation where you might not want the auto-order to occur. What if you want the sub to move silently past surface targets, instead of attacking them? You're SOL. You can try to base the auto-behavior on movement, but even then, you have to keep it moving non-stop (and not on a patrol) to keep it from auto-surfacing.
The only thing I can think to try would be to make the primary weapon the subsurface-to-surface dummy weapon, and give it whichever blueprint flag prevents it from auto-acquiring targets. If that flag actually works (I don't recall), you could make the sub surface by giving it an attack order on a surface target, but that might negatively impact its target behavior w/r/t sub-surface or water targets assuming it has torpedoes as well-- because those would no longer be the primary weapon, and it would have difficulty knowing which range to position itself at when given an attack order against sub targets.
Missile flight pattern tuts?
[:1]So, i've been messing with costum missiles wanting to make ballistic missiles. And i'd like to know if there's some tutorial on what the script values for flight patterns do. I got a rough idea but not nearly all of it.|||Ballistic how? because you can also make them like basic projectiles that look like missiles, I'm pretty sure thats what GPG did for the Corsair.
Mike|||There are no 'flight values' for missiles. Missiles are self-propelled and home in on their target (whether a unit or a ground location). Any special behavior (e.g. tactical missiles, nukes) is handled specifically by each missile's script, usually by limiting turn rate and checking distance. A tutorial on that would be silly, because it's different for each missile, and clearly spelled out in each missile's script.|||I meant the tactical missiles, i based my ballistic missile script off it, i (sort of) got it to fly straight up, then make a slow turn till its half way to the target, and then accelerate madly and dive onto it, problem is that doesnt happen at all distances. The only thing i dont really understand is the distance checking and how it's related to all the other things, and i'm guessing that's critical to solving my problem. The way i want it to fly is go straight up for a while, then turn a bit toward the target, then go straight again till its halfway to the target, almost stop at a very high altitude, turn toward it target slowly, and then dive towards it very fast (kinda like how real ballistic missiles fly)|||Then copy the nuke script's distance/movethread functions, because those have a flight path much closer to what you're looking for.
They basically only allow the missile to turn for a set period if time at a specific turnrate at the top of its initial flight, so it turns roughly 90 degrees and flattens out moving toward the target. Then when it gets almost above the target, the distance check opens up the turnrate again and it turns downward toward the target. You can just insert increases to accel/speed/etc at the point where it turns downward, and you should get the behavior you want.|||Alright, will do that. Thanks.
Mike|||There are no 'flight values' for missiles. Missiles are self-propelled and home in on their target (whether a unit or a ground location). Any special behavior (e.g. tactical missiles, nukes) is handled specifically by each missile's script, usually by limiting turn rate and checking distance. A tutorial on that would be silly, because it's different for each missile, and clearly spelled out in each missile's script.|||I meant the tactical missiles, i based my ballistic missile script off it, i (sort of) got it to fly straight up, then make a slow turn till its half way to the target, and then accelerate madly and dive onto it, problem is that doesnt happen at all distances. The only thing i dont really understand is the distance checking and how it's related to all the other things, and i'm guessing that's critical to solving my problem. The way i want it to fly is go straight up for a while, then turn a bit toward the target, then go straight again till its halfway to the target, almost stop at a very high altitude, turn toward it target slowly, and then dive towards it very fast (kinda like how real ballistic missiles fly)|||Then copy the nuke script's distance/movethread functions, because those have a flight path much closer to what you're looking for.
They basically only allow the missile to turn for a set period if time at a specific turnrate at the top of its initial flight, so it turns roughly 90 degrees and flattens out moving toward the target. Then when it gets almost above the target, the distance check opens up the turnrate again and it turns downward toward the target. You can just insert increases to accel/speed/etc at the point where it turns downward, and you should get the behavior you want.|||Alright, will do that. Thanks.
Unit Cap Question
[:1]I edited Sirians lobbyenhancement.scd to make a 300 unit cap. It's the only thing I've changed but from the one game I've played so far it seemed like the AI actually attacked less. They did appear to build more inty's but the attacks from land didn't seem as heavy or constant. I think there may have been more base buildup as well with shields compared to normal.
Does the actual unit cap effect how the AI plays or could it have just been a fluk? I want more than 250 units but less than 500. Is there an optimal number?|||Since structures count as cap too, what changes you make are going to have a massive influence on the behaviour of the AI.
What you'd have to do is actually adjust the behaviour of the AI... reprogram it for the lack of a better term.|||Or remove structures from the unit cap.|||Going from 250 to 300 cap shouldn't change the AI's behavior at all (not negatively, at least). Going from 500 to 300 might, but that depends on how far in advance the AI predicts running into the cap (I don't know if it does at all).|||Thanks all. At least I know I can use any number. May try 275 and see how that does.
Does the actual unit cap effect how the AI plays or could it have just been a fluk? I want more than 250 units but less than 500. Is there an optimal number?|||Since structures count as cap too, what changes you make are going to have a massive influence on the behaviour of the AI.
What you'd have to do is actually adjust the behaviour of the AI... reprogram it for the lack of a better term.|||Or remove structures from the unit cap.|||Going from 250 to 300 cap shouldn't change the AI's behavior at all (not negatively, at least). Going from 500 to 300 might, but that depends on how far in advance the AI predicts running into the cap (I don't know if it does at all).|||Thanks all. At least I know I can use any number. May try 275 and see how that does.
[SC2] [SOLVED] Create an ability?
[:1]SOLVED, I was missing a file that I needed to modify
How do I create an ability? I am just copying the RechargeShield_Ability .bp and .lua file, and then renaming them RechargeShell_Ability .bp and .lua. But whenever I try to use it, one of two things happen.
If I tell the unit in question to load the ability 'RechargeShell' without the '_Ability.bp'
ending, the game crashes when the unit is selected. But when I type out the full name, the ability does not appear at all! (I have checked, it is set to be enabled from the start)
What am I doing wrong?|||Look at the Massive Conversion mod I released. It creates two new abilities, adds them to the UI abilities table (lack of this is what's causing your crash), and adds them to the appropriate units.
Make sure when you call SetAbilityEnabled that you give it an all-lowercase ability blueprintid. The blueprint filename's case doesn't matter - all blueprintids are converted to lowercase when the blueprints load.|||Thanks. I've taken some time to experiment, and now it works wonders!
I have three new abilities already:
Launch Escape Pod/Detonate Reactor
Vision Boost
Extractor Overdrive
Despite SC2's lack of hooking ability, its buff system is marvelous, allowing for so many possibilities!
How do I create an ability? I am just copying the RechargeShield_Ability .bp and .lua file, and then renaming them RechargeShell_Ability .bp and .lua. But whenever I try to use it, one of two things happen.
If I tell the unit in question to load the ability 'RechargeShell' without the '_Ability.bp'
ending, the game crashes when the unit is selected. But when I type out the full name, the ability does not appear at all! (I have checked, it is set to be enabled from the start)
What am I doing wrong?|||Look at the Massive Conversion mod I released. It creates two new abilities, adds them to the UI abilities table (lack of this is what's causing your crash), and adds them to the appropriate units.
Make sure when you call SetAbilityEnabled that you give it an all-lowercase ability blueprintid. The blueprint filename's case doesn't matter - all blueprintids are converted to lowercase when the blueprints load.|||Thanks. I've taken some time to experiment, and now it works wonders!
I have three new abilities already:
Launch Escape Pod/Detonate Reactor
Vision Boost
Extractor Overdrive
Despite SC2's lack of hooking ability, its buff system is marvelous, allowing for so many possibilities!
Turret uses wrong Bone to rotate
[:1]He all, i have a problem with the rotation of a turret on my spaceship. It seems that it uses the root bone for pitch an yaw... Didn't have this problem ever! Do you have any ideas? (sorry for my bad english)|||from the sound of things, its an issue with the weapon code, not the model itself.
Of course the model itself could still have an issue, but I don't think we'd be able to figure it out until we fix the current issue.
Post the unit's BP(bluepprint) with PasteBin and we'll take a look at that to see whats going on.
Also have you checked the Log for any Errors? if you don't know what I'm talking about you should check this guide out;
[TUTORIAL] Basics, Units/Projectiles/Beams Creation
For the time being I'll move this to Mod Dev Support.
Mike|||Okay, i have solved my problem by myselfe... But i dont know how
I played around with several bone cennections, exported it again and again and then it worked... strange! Iam not complete new at modding, and until this problem guns where the objects i had the least problems with it. Hm...but thanks for the fast reply!
Of course the model itself could still have an issue, but I don't think we'd be able to figure it out until we fix the current issue.
Post the unit's BP(bluepprint) with PasteBin and we'll take a look at that to see whats going on.
Also have you checked the Log for any Errors? if you don't know what I'm talking about you should check this guide out;
[TUTORIAL] Basics, Units/Projectiles/Beams Creation
For the time being I'll move this to Mod Dev Support.
Mike|||Okay, i have solved my problem by myselfe... But i dont know how
I played around with several bone cennections, exported it again and again and then it worked... strange! Iam not complete new at modding, and until this problem guns where the objects i had the least problems with it. Hm...but thanks for the fast reply!
Subscribe to:
Posts (Atom)