Mod Question Repository... Questions come in, answers go out - Page 17

Mod Question Repository... Questions come in, answers go out

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

Locked
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Well, I have an example on mine, I prefer to use as simple things as I can. Passive units are... Non agressive units, they won't shoot back, so why target the first? lol

Code: Select all

	Category=GROUND VEHICLE;
	BadTargetCategory=Passive;
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Category is simply a list of keywords, it means nothing by itself. Onlytargetcategory, badtargetcategory, nochasecategory and toAirWeapon use these keywords.
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Post by Erom »

Wow. OK, that's what I thought - but literally, I have two units, one will be attacked by everything in the mod, one by nothing. I can change both of their categories to something completely arbitrary and it still doesn't work. I have no category based weapon tags at all, on any unit yet. Everything shoots at the first unit, nothing shoots at the second unit. Both are ground units. One is a kbot, one is a tank, should that matter? What's going on!
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post by tombom »

Erom wrote:Wow. OK, that's what I thought - but literally, I have two units, one will be attacked by everything in the mod, one by nothing. I can change both of their categories to something completely arbitrary and it still doesn't work. I have no category based weapon tags at all, on any unit yet. Everything shoots at the first unit, nothing shoots at the second unit. Both are ground units. One is a kbot, one is a tank, should that matter? What's going on!
Try testing in SVN and see if it gives any errors or anything.
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Post by Erom »

No errors, but the same weird performance. I've investigated a bit more though, got a truer understanding of the situation (a little different than my first report)

Unit A, category "INFANTRY", valid target, shot by everything
Unit B, category "INFANTRY", nothing will shoot
Unit A, category "HEAVY", valid target, shot by everything
Unit B, category "HEAVY", nothing will shoot

No weapons have restrictions, so HEAVY should be a valid target. But nothing. So I assume something else is blocking... but I can't think of what. They are both really ground units, one isn't like a low flying air unit by accident. Full disclosure: I'm still ripping things from OTA right now, unit A is a slightly modified zeus, and unit B is a slightly modified stumpy.

Two other things:
Is there any way to set something to 0 metal cost? It seems to floor at 1.
Is there any way to set something to 0 damage against an armor class? That also seems to floor at 1. (I have a weapon with 0 default damage, and 0 damage against a certain armorclass, and it still deals 1 damage with every shot.)
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Post by Erom »

And it works now, all of a sudden... and I didn't change anything but deleted some cruft sitting in the mod archive. Going to check exactly what - I feel like, at some point the fire control code must be referencing the category field of the unit that uses the target model, and finding say "ARM_STUMPY" before my unit taking that... actually, that shouldn't matter, the weapon still should have fired, even if it mistook the unit for an OTA unit.

Somethings wonky here, no doubt, but my problem misteriously vanished. I'm always afraid when stuff "just worked that time" that it might just as randomly return later.

Oh well, I'm leaving my ramblings up while I test some more, since this is the thread for that.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

If you can find the problem, feel free to post it, my current commander hasn't been hit ever since I made him.
User avatar
MightySheep
Posts: 243
Joined: 11 Nov 2007, 02:17

Post by MightySheep »

Snipawolf wrote:Well, I have an example on mine, I prefer to use as simple things as I can. Passive units are... Non agressive units, they won't shoot back, so why target the first? lol

Code: Select all

	Category=GROUND VEHICLE;
	BadTargetCategory=Passive;


just from reading that i realise coding must be very hard :?
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Hmmm?

That is the simple part. Unit stats. Scripting is a little harder, depending on what you are trying to do.

Actual coding means lua or C++ coding. Tweaking stats/scripting is what you call it when you are making a mod/game.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

By now the hardest part of engine coding is probably to make sure you don't break legacy support...
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

Does anyone know how the "idle" status in idletime and idleautoheal is measured / can be influenced? Like it's said in the Wiki I thought you would need to don't move your unit (or have it shooting etc.) for a while to make this come in. But ingame it works different:

Here idling just means not being hit for a certain time. With that said the autoheal will come in when you aren't under fire (and stops when you are) - it doesn't mind walking around or shooting...

I'm asking this because I'd really like to have the autoheal only when not moving / shooting...
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

KDR_11k wrote:By now the hardest part of engine coding is probably to make sure you don't break legacy support...
Imho, that's where OSRTS made a mistake, and floundered. The goal shouldn't have been to re-write the engine from scratch, but to simply fork Spring without focussing on backwards-compat. Dike out the bonus shield, all the special damages, etc.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I don't think that was a mistake, it's probably easier to rewrite from zero than trying to turn Spring insto something completely different.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

Ok - now something more simple:
I want to use this in my COB Script:

Code: Select all

emit-sfx 1024 + 0 from rexhaust;
But it miracly seems to work only for just a few units as it keeps crashing most of the other units when they fire. Does the object have to have a "exhaust" in its name or something or is there something else you have to take care of when using this (sfxtype and efxtype are included of course)?

Thanks in advance...
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

The object has to be called 'rexhaust' exactly.

Or you can change the code

Code: Select all

emit-sfx 1024 + 0 from my_really_cool_object_name;
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

FLOZi wrote:The object has to be called 'rexhaust' exactly.

Or you can change the code

Code: Select all

emit-sfx 1024 + 0 from my_really_cool_object_name;
Nah, that's not the problem - I of course know that the object I call has to exist in the model I use... :wink:

It's just that I once used a modified Storm-Script for a new unit where the point is called "rexhaust" and everything works fine. Now I tried to just enter the sfx-spawning on multiple different units (where I didn't call it that way) but Spring just crashes. So I asked about the naming too - maybe somewhere it was defined that such an object has to be called "rexhaust / lexhaust"...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Did you remember to add the CEG tags to the unit fbis?
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

KDR_11k wrote:Did you remember to add the CEG tags to the unit fbis?
Thx for pointing that out again - I checked the FBIs and found a mistake there. It's working now... :-)
deathexile
Posts: 2
Joined: 16 Nov 2007, 22:12

Post by deathexile »

dunno if this question is pertinent to modding itself, but it does involve a mod, so i figured to stick it here. im playing EE against the AI and find that the AI builds nothing but radar, floating radar, l1 power plants, and on rare occasions some chaingun type defense system. Is there an AI out there that works with EE to make it intelligent rather than just build junk? I think it has something to do with the having to build towers to build unit building facilities..
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

RAI most likely will do well.

It works finely with most other mods I use it with.
Locked

Return to “Game Development Tutorials & Resources”