Posted: Thu Jun 13, 2013 5:07 pm Post subject:
Troubleshooting Assistance Required: RJiggler's Shenanigans
Subject description: OH GOSH
Well, hey guys. Â I've been lurking the Red Alert 2 modding scene for years, failing for many of them at my attempts to incorporate new units and miscellaneous items into my game. Â Last year was actually the beginning of my first successful attempts, and I've made an awful lot of awesome stuff. Â Would be happy to post my codes as contribution for all that this community has given me over the years.
Now, my current undertaking is a Drone Command Tower that launches Predator UAV drones across the map to randomly harass hostile forces. Â It auto-acquires targets and spawns the UAV in the same method that the Aircraft carrier does (it's code largely borrows from the Aircraft Carrier/Hornet). Â The tower is powered, however, and if the power goes offline, then the Drones crash (similar to the Robot Control Center). Â Â The point of this, at any rate, is to introduce some amount of automation into the Americans country in my build. Â However, the game immediately crashed as soon as I selected the tower to build, so at a n00b's first glance, I suspect the code thus far isn't necessarily flawed with the Drone, but is definitely with the tower. Â Here's my work so far:
[DRNTWR]; Clone of Prism Tower
UIName=Name:DRNTWR
Name=Drone Control Tower
Image=GAPRIS
BuildCat=Combat
Prerequisite=POWER,RADAR,GACNST
Strength=600
Armor=steel
TechLevel=6
Adjacent=2
Sight=10
Owner=Americans
Cost=2200
Points=40
Power=-105
Crewed=no
Capturable=false
Overpowerable=false
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
DestroyAnim=NATSLADM
Primary=PREDLauncher
Secondary=
Spawns=APRD
SpawnsNumber=1
SpawnRegenRate=5000
SpawnReloadRate=1000
Turret=no
TurretAnimZAdjust=-100
DebrisAnim=Dbris1sm,Dbris1lg,Dbris4sm,Dbris5sm,Dbris4lg,Dbris7sm,Dbris8sm,Dbris5lg,Dbris4lg
MaxDebris=15
MinDebris=5
ThreatPosed=40 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=96, 64, 112
IsBaseDefense=yes
BaseNormal=no
HasStupidGuardMode=false
WorkingSound=PowerOn
NotWorkingSound=PowerOff
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
Drainable=yes
AntiInfantryValue=25
AntiArmorValue=25
AntiAirValue=0
Powered=true
PowersUnit=APRD
[APRD]; Clone of Hornet
UIName=Name:APRD
Name=Predator UAV
Primary=HornetBomb
Secondary=HornetCollision
Strength=105
Category=AirPower
Armor=light
Spawned=yes
TechLevel=-1
Sight=3
RadarInvisible=no
Landable=yes
MoveToShroud=yes
;Dock=NAHPAD,GAHPAD
;Dock=GAAIRC,AMRADR
PipScale=Ammo
Speed=12
PitchSpeed=.9
PitchAngle=0
Owner=Americans
Cost=50
Points=20
ROT=3
Ammo=1
Crewed=no
GuardRange=30
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=2
VoiceSelect=
VoiceMove=
VoiceAttack=
VoiceFeedback=
DieSound=
ActivateSound= RobotTankOnline
DeactivateSound= RobotTankOffline
CrashingSound=HornetDie
ImpactLandSound=GenAircraftCrash
Locomotor={4A582746-9839-11d1-B709-00A024DDAFD1}
MovementZone=Fly
ThreatPosed=10 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
AuxSound1=HornetTakeoff ;Taking off
AuxSound2=HornetLanding ;Landing
ImmuneToPsionics=yes
VeteranAbilities=STRONGER,FIREPOWER
EliteAbilities=STRONGER,FIREPOWER
;Selectable=no ; SJM: this should be here but is commented out because bug prevents aircraft from landing
ElitePrimary=HornetBombE
PoweredUnit=yes
Does anyone have any ideas? Â I'd really like to make this work before the discouragement makes me loose my momentum. Â
Also, I'm happy to share all my code for my completed units, the few cameos I've made myself, and the brainstorming I've had on new units (it's pretty massive; I've got a lot of solid concepts to share).
[Also, I would understand if I didn't place this topic in the right subforum. Â If that's the case, please be so kind as to redirect me.] Last edited by RJiggler on Tue Jun 18, 2013 7:10 pm; edited 1 time in total QUICK_EDIT
I'm going to be absolutely honest with you, I have no idea what except.txt is or refers to. Â I don't think I've ever encountered it thus far, and I've added buildings and units without running into it.
Is it related to ARES? Â I have yet to install that.
Also, I'm not seeing what I'm missing with naming and Theatres. Is there a tag I'm missing or misusing? QUICK_EDIT
Ah. It's not specified, so it defaults to 'g', correct? Then I need to make that specific.
Oh, shit. I've never even heard of except.txt until right now. Well, I'll run that when I get back home and see if I can fix the issue myself, will post further if I still can't find the answer. Thank you so much for the help thus far. QUICK_EDIT
Just delete that tag, if it's not there the game will automatically "N/A" it, if it's listed tho you need to add a valid weapon or the game will crash. _________________
Just delete that tag, if it's not there the game will automatically "N/A" it, if it's listed tho you need to add a valid weapon or the game will crash.
Excellent!
By the way, your Metal Gear REX was the breaking point that convinced me I wanted to stop just thinking about it and start modding. I really, really love your work. Also made a cameo set out of this picture, if you'd like it. QUICK_EDIT
If he uses Image, it doesn't matter much. Besides, with Ares, the first character can be anything due to a fix it introduced.
[...]
Thank you for undermining this attempt to propagate some best practices.
The fact that Ares made bad code possible is totally a good reason to keep newbs in the dark about their questionable choices and to let them run wild with them.
The secondary weapon change didn't fix it, but I got the tower buildable. The game does, however, crash as soon as the tower attempts to attack. The current issue is 004145BD, but the HVA doesn't seem to fail in the file viewer. QUICK_EDIT
I've used Hornet spawning Defenses in my mod and map mods since long before Ares, so what your doing is very possible. Just not sure what you're doing wrong, without looking over your code more, If you want I code provide the code from my mod.
Make sure your building is only 1X1 in art, make sure art is good on spawned aircraft. Poweredby logic works in Ares, but original game PoweresUnit logic may not work correctly with spawns "might even crash game".
Also make sure your aircraft is listed under aircrafttypes. _________________ Grab my Map Logic Expansion Pack 5.2 here!
Adds random weather patterns into maps.
More disabled navalyards.
Preplaced Neutral buildings.
Additional new features.
Internal Error with EIP 004145BD can be caused by other things than a corrupted/missing HVA, most notably following.
- Missing entry in artmd.ini for the AircraftType in question.
- AircraftType is not properly introduced in AircraftTypes list, only really applicable in cases where the said AircraftType is spawned by other means than construction (Superweapon, spawner).
I would recommend you to double check the above things before proceeding to investigate any further. _________________ QUICK_EDIT
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Fri Jun 14, 2013 8:47 am Post subject:
Renegade wrote:
Graion Dilach wrote:
If he uses Image, it doesn't matter much. Besides, with Ares, the first character can be anything due to a fix it introduced.
Thank you for undermining this attempt to propagate some best practices.
The fact that Ares made bad code possible is totally a good reason to keep newbs in the dark about their questionable choices and to let them run wild with them.
I have 5 sides. They use GA, NA, YA, PA and BA respectively. Thank you for undermining my attempt to actually spread valid information... once you already posted this for a 4th side building and it was perfectly valid and reasoned there. PACNST sounds better than GACNSTPACIFIC or some other wtf, don't you think?
I have used stupid code snappets as well ages ago (SAIRPAD)... then I realized it's much more fitting if I use WW's standard there (NAAIRP). However I realized this on my own, and I'm pretty sure that this guy will also will.
Here's the situation thus far:
-The tower was crashing because, like the dumbass I am, I forgot to put the completed code for the PREDLauncher into weapons. That solved the tower crash.
-The art file for ARPD (Predator UAV) is intact and the voxel and hva, as far as TibEd is considered, are intact and operational.
-The attack issue seems to be the SHP of the Prism Tower doing the attack animation twice before the game crashes. If possible, I'd like to cut the animation out, regardless of it's impact on the actual attack. (Also, the Prism Tower is a 1x1, I remember reading into that and making sure the building, until I can find a suitable custom shp, would be plausible)
-The Aircraft type is also included, so that's not an issue either. Unless I'm stupid enough to have mistyped ARPD (I have mistakenly wrote APRD in other instances, I noticed yesterday), in which case I need to check everything one more time and make sure I'm not doing the same ztyping mistake that boils down to a two-letter typo.
Also, I'm sorry for inspiring rap beef/ modder arguments. Graion and Renegade, in lurking I've noticed both of you have given vast contributions to the site, and you're both great help to dreamers like myself. I do very much appreciate the help, and would hope that nobody argues over my behalf. Any possible solutions are helpful.
Well, I haven't started work on them, but I have plenty of other ideas I'd like to flesh out and have your peer review on, guys. Completed code will be shared without hesitation. Any interest? QUICK_EDIT
I have to defer to the last paragraph. Â I'm really not yet at a point where I know every base I have to cover, and it's convenient for getting through the files and applying the changes to the game directly. Â It could use many, many updates, but for my purposes, it gets the job done.
I'm newbish. Â Gimme a break.
Though, I do think that was the point-- I may have been enough of a dumbass to forget to specify Image=, considering it wasn't in the RulesMD file. Sorry for such an anticlimactic flaw, will post results this afternoon QUICK_EDIT
Are there RA2-related plugins for NotePad++? Cause, as much as I'm starting to understand how much you guys despise it, it has a manual/notepad editor built into it, and that's how I've been inserting my code (which is coincidentally the mistake for checking my work, considering the issue is likely "Image=").
I only use the text boxes when I want to experiment in making new weapon/warhead types, though I'm frequently running into some type of audio issue when I do. Nobody would know off the back of their heads what that would be, would they? That'd [partially] fix the issues with my Mi-24D. QUICK_EDIT
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Fri Jun 14, 2013 8:36 pm Post subject:
The main issue with the manual code injector within that mess, that as soon as you leave the manual page, TibEd has a habit to override your manual stuff with his own crap.
[...]
Thank you for undermining my attempt to actually spread valid information... [...]
I can write a perfectly valid C# program by having 200 static void methods in a single existing class, managing code flow by goto and information flow through out parameters.
While TibEd might be handy for newbies, it has a tendency to clutter the code the more changes you make.
If you keep using TibEd for very long, at one point you'll have to rewrite your whole mod from scratch, because it simply won't work correctly anymore (or it will, but any further changes will be completely ignored). This, and people asking for help with debugging such mods, is where this "TibEd hate" comes from.
Using a text editor will save everybody trouble, and better teach you how the game really works. QUICK_EDIT
Okay. All of that was handled, also went into the manual editor and scraped out the unnecessary lines. Definitely something that I should keep an eye on if I decide to keep using it, though I'm leaning towards only-text editing.
New question: I'm trying to give the Allies a "SkyNet Control Center" that allows the production of cyborg units and Terminator-themed stuff. The gimmick is that, if destroyed, the cyborgs will go rogue and be hostile to all players, in the same manner as the chaos gas from Yuri's drones. Can it be done? QUICK_EDIT
Renegade, it's absolutely pointless to do it "your" way now. As long as the art code is OK, the actual building name in rules.ini is irrelevant. So stop trying to send other people "into the dark" and not out.
Tibed is absolutely awful once you start with text editing, you never go back. I have never heard of any text RA2 modder saying "I want tibed back"
Download Notapad++ (free and open source) and you can have mutiple tabs and other fuctionality for code editors, it even auto-colors everything for your necessity (normal notepad sucks)
PD: As to your "can it be done", you could give it a custom armor with Ares and give the drone center a deathweapon with chaos that only affects that kind of armor (or, without ares, you could set apart another armor type, like the Terror Drone armor, or Missile armors, that are the last 2 and not used for "regular" units). It would have a cellspread limit of 10 (perhaps you could extend it with "proyectile" practices), though. _________________
You could do this by having a destruction animation for the building that creates another structure (again, Ares is needed) with a weapon with 255 range, fires a long-standing chaos weapon that can only target "cyborgs", and damages itself every second, so that it takes maybe 10% of the buildings health per 15 frames. I would think that would be fast enough, and you could create a short enough destruction animation without too much work. _________________ "Don't beg for things; Do it yourself or you'll never get anything." QUICK_EDIT
Do people actually test before they test theories?
Isn't obvious issue with if two players are using cyborgs?
Also the building isn't neutral when destroyed to my knowledge and pretty certain rubble in Ares had limited features at present.
Also what happens when player builds another centre - why would his existing cyborgs still be beserk or why would the crazy suddenly wear off? _________________ QUICK_EDIT
Renegade, it's absolutely pointless to do it "your" way now. As long as the art code is OK, the actual building name in rules.ini is irrelevant. So stop trying to send other people "into the dark" and not out.
[...]
Just how retarded are you, really?
Trying to characterize the proper, patch-independently, version-independently, universally working way as "Renegade's way" and condemning it as some sort of backwards hack because one patch at one point in time made the messy way work is about the stupidest way to oppose something I said I've seen for a while.
Especially considering the thread was rebooted with a new question three days ago. _________________ #renproj:renegadeprojects.com via Matrix - direct link QUICK_EDIT
This thread has become, just... SUPER hostile, but I'm just gonna keep soaking up what info I can between the insults and see what I can piece together to make this work.
@Allied General, the thing would come down to the player at hand. Â I don't know if the chaos-inducing parameters are not as flexible as the powered tag of the Robot Control Center, but the idea is that building multiple SkyNet control points would keep them friendly to the builder if the enemy managed to destroy one. Â That does, however, complicate the idea of letting you make it's death target all of them with the chaos effect. Â Confusing. Â Also, as far as the concept goes, once you loose the Cyborgs / Terminators, you've lost them for good.
If the idea isn't within the realm of possibility for now, I can just put it on the backburner and concern myself with making the units' basic functions. Â Between a near-Arnie Frankfurter T2 T-800, a Hunter-Killer VTOL and a FarCry3: Blood Dragon-born Cyborg Commando wielding a triple burst laser pistol, I'm running behind.
I've been doing a lot of brainstorming, and I'm thinking that one of the essential elements to Ukraine (which would be using primarily RA1 units in lieu of RA2's options) would be a Spetznaz soldier who, using the SEAL's C4 animation, would leave a smoke marker for a Badger Bomber to come and carpet bomb the area. Â I haven't yet started work on it but I lost the instructions for making Carpet Bombing weapons, and if anyone has the link (or just knows) I'd love the info.
SIDE NOTE: Anybody have any idea why a unit icon would occasionally switch to something completely different? ArtMD entries check out but in-game, MIGREX turns to ZEP without explanation. Last edited by RJiggler on Tue Jun 18, 2013 7:50 pm; edited 1 time in total QUICK_EDIT
Trying to characterize the proper, patch-independently, version-independently, universally working way as "Renegade's way" and condemning it as some sort of backwards hack because one patch at one point in time made the messy way work is about the stupidest way to oppose something I said I've seen for a while.
Especially considering the thread was rebooted with a new question three days ago.
Just hoy retarded are YOU really? This doesn't even have problems in the unpatched version since THEATHERS WORK WITH ART CODES. So any building that is called even "[djjadskas.djkjj bleh]" will work as long as they point out to an image called "[GAPRIS]" with correct coding as in this case.
That you have OCD and superstition doesn't mean you get to insult those who just use a practical way.
Figures. I'd been looking through the code but not seeing any answers. Suppose I had it coming.
Honestly, the hostility makes this thread reminiscent of a Mos Eisley cantina. Thus far, I approve. I'll start posting my code for units soon so others can try out what I've got going. Least I can do for the attention and time you guys have given me. QUICK_EDIT
Figures. Â I'd been looking through the code but not seeing any answers. Â Suppose I had it coming.
Honestly, the hostility makes this thread reminiscent of a Mos Eisley cantina. Â Thus far, I approve. Â I'll start posting my code for units soon so others can try out what I've got going. Â Least I can do for the attention and time you guys have given me.
My new quote .
AFAIK, it's not possible to airstrike without it being a superweapon or a Boris laser. But what do I know? _________________ "Don't beg for things; Do it yourself or you'll never get anything." QUICK_EDIT
Yeah, I'm using Boris' laser, though I did find something for making a smoke marker that doesn't require the unit to stay idle. The laser targetting isn't very pretty visually, but I'll explain.
My future interest in my SEAL-type SAS unit is to give him an airstrike with a SR-71 Blackbird. Â For now, I'm just working with Black Eagles.
When you give someone an airstrike marker as a secondary weapon, ie
Code:
[SASFlare]; (Weapon)
Damage=1
ROF=60
Range=18
Warhead=SASAirstrikeFlare
MigAttackCursor=yes
Charges=no
LaserInnerColor = 0,0,250
LaserOuterColor = 0,0,120;0,0,0
LaserOuterSpread= 40,80,80;20,40,40
LaserDuration = 90;15
Projectile=Invisible;LLine2
IsLaser=true ; this flag tells the game to use the special laser draw effect
IsLine=true
IsHouseColor=no; I prefer to give different airstrikes different colors
The problem with this code thus far is that the units are still drawing red lines while the color has changed. Â If anybody knows what I did wrong with the weapon code, please let me know so I can fix that.
Also, keep in mind that whatever you're spawning must not be allowed to land. Â The Black Eagle did indeed fly in and bomb the structure, but it proceeded to land at my Airforce Command and awkwardly reload while I couldn't order it. Â If you stop your attack targetting while it's mid-flight, however, it will fly back off-screen.
As far as the smoke marker method, I haven't looked into it just yet but I think that's a possible method of making unit-triggered paradrops. Â If successful, I'll have that soviet unit (which I think I'll keep separate from the Spetznaz) call in the Badger bomber and paradrops separately, but be otherwise completely defenseless. Â We'll see, I'll let you guys know how things progress.
Other ideas in the pipeline include Natasha (who instead of using airstrikes, plants landmines), Terror drones that deploy into high-explosive and/or EMP landmines, Magnetic/kinetic weapons, and a couple others. Â BTW, assuming it hasn't been tried by all of you already, giving boats the Magnetron weapon is genius. Â It drags shoreline armor units into the sea fast enough to do more damage than the original unit does. QUICK_EDIT
No no, I figured that out. I thought I said that. The issue is that the unit still produces a red Laser line while also creating the custom colored one, and the two are spaced apart. It's odd. QUICK_EDIT
Yes, mevitar is right.
In rulesmd IsLine=true is set only on [Flare] weapon which is used by Boris. There, can be assigned IsHouseColor=true, or perhaps laser colors tags, although I haven't tested it. _________________
Did not get to test it. Will today, but I have some more questions I was hoping we could get figured out.
-Can voxel units get resource donation logic, like Oil Derricks?
-Can units add power to power plants using logic similar to Tesla Troopers overpowering Coils?
-Is it possible to use an airstrike to call in the Paradrop plane? I thought the logic was sound but in retrospect I feel like people have likely tried it by now and may be able to offer advice QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum