Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MadHQ's odd coding problems.
#1
I am having a problem with the custom foundations. This may just be because I am trying to use a custom foundation for an airfield. The art shows up just fine, however the foundation is not working. And the planes do not lad they just hover over the pads. I have added my art code and shp files for some one to have a look and see if they can figure out whats going on. I also added a picture of the foundation from the foundation generator, it could be that there maybe a mistake there...

Code:
Code:
[GAAIRC]
Remapable=yes
Cameo=HELIICON
Foundation = Custom
Foundation.X = 5
Foundation.Y = 4
Foundation.0 = 0,-3
Foundation.1 = 0,-3
FoundationOutline.Length = 28
FoundationOutline.0 = -1,-3
FoundationOutline.1 = 0,-3
FoundationOutline.2 = 1,-3
FoundationOutline.3 = 2,-3
FoundationOutline.4 = 3,-3
FoundationOutline.5 = 4,-3
FoundationOutline.6 = 5,-3
FoundationOutline.7 = -1,-3
FoundationOutline.8 = 0,-3
FoundationOutline.9 = 3,-3
FoundationOutline.10 = 4,-3
FoundationOutline.11 = 5,-3
FoundationOutline.12 = -1,-3
FoundationOutline.13 = 5,-3
FoundationOutline.14 = -1,-3
FoundationOutline.15 = 5,-3
FoundationOutline.16 = -1,-3
FoundationOutline.17 = 0,-3
FoundationOutline.18 = 3,-3
FoundationOutline.19 = 4,-3
FoundationOutline.20 = 5,-3
FoundationOutline.21 = -1,-3
FoundationOutline.22 = 0,-3
FoundationOutline.23 = 1,-3
FoundationOutline.24 = 2,-3
FoundationOutline.25 = 3,-3
FoundationOutline.26 = 4,-3
FoundationOutline.27 = 5,-3
Height=7
Flat=yes ; while this is a valid BuilType flag, it does nothing.
Buildup=GAAIRCMK
BibShape=GAAIRCBB
ZShapePointMove=60,30 ; SJM is fixing zshape/zshapelocky problems, changed from 0,0
DemandLoadBuildup=true
FreeBuildup=true
NewTheater=yes
DockingOffset0=-256,-384,0
DockingOffset1=-256,-128,0
DockingOffset2=-256,128,0
DockingOffset3=-256,384,0
DockingOffset4=0,-384,0
DockingOffset5=0,-128,0
DockingOffset6=0,128,0
DockingOffset7=0,384,0
DockingOffset8=256,-128,0
DockingOffset9=256,128,0
DockingOffset10=512,-128,0
DockingOffset11=512,128,0
ActiveAnim=GAAIRC_A
ActiveAnimDamaged=GAAIRC_AD
ActiveAnimZAdjust=0
ActiveAnimX=-28
ActiveAnimY=18
ActiveAnimYSort=362
ActiveAnimTwo=GAAIRC_B
ActiveAnimTwoDamaged=GAAIRC_BD
ActiveAnimTwoZAdjust=0
ActiveAnimTwoX=-28
ActiveAnimTwoY=18
ActiveAnimTwoYSort=362
ActiveAnimThree=GAAIRC_C
ActiveAnimThreeDamaged=GAAIRC_CD
ActiveAnimThreeZAdjust=-80
ActiveAnimThreeX=-28
ActiveAnimThreeY=18
ActiveAnimThreeYSort=543
CanHideThings=True
CanBeHidden=False
OccupyHeight=2
AddOccupy1=-1,-1
AddOccupy2=-1,0
AddOccupy3=-2,-1
AddOccupy4=-3,-2
RemoveOccupy1=1,0
RemoveOccupy2=2,0
RemoveOccupy3=1,1
RemoveOccupy4=2,2
DamageFireOffset0=-36,23
DamageFireOffset1=-21,6


Attached Files Thumbnail(s)
   

.rar   art.rar (Size: 25.62 KB / Downloads: 479)
-RA2/YR GFX Depot Click here!
Reply
#2
Umm...your foundation code is totally not making sense to me.

For that foundation, according to the generator, it should look like
Code:
[CATEMP]
Foundation = Custom
Foundation.X = 5
Foundation.Y = 4
Foundation.0 = 1,0
Foundation.1 = 2,0
Foundation.2 = 0,1
Foundation.3 = 1,1
Foundation.4 = 2,1
Foundation.5 = 3,1
Foundation.6 = 4,1
Foundation.7 = 0,2
Foundation.8 = 1,2
Foundation.9 = 2,2
Foundation.10 = 3,2
Foundation.11 = 4,2
Foundation.12 = 1,3
Foundation.13 = 2,3
FoundationOutline.Length = 22
FoundationOutline.0 = 0,-1
FoundationOutline.1 = 1,-1
FoundationOutline.2 = 2,-1
FoundationOutline.3 = 3,-1
FoundationOutline.4 = -1,0
FoundationOutline.5 = 0,0
FoundationOutline.6 = 3,0
FoundationOutline.7 = 4,0
FoundationOutline.8 = 5,0
FoundationOutline.9 = -1,1
FoundationOutline.10 = 5,1
FoundationOutline.11 = -1,2
FoundationOutline.12 = 5,2
FoundationOutline.13 = -1,3
FoundationOutline.14 = 0,3
FoundationOutline.15 = 3,3
FoundationOutline.16 = 4,3
FoundationOutline.17 = 5,3
FoundationOutline.18 = 0,4
FoundationOutline.19 = 1,4
FoundationOutline.20 = 2,4
FoundationOutline.21 = 3,4

The issues are immediately apparent when you see that, not only do you have way, way too few cells, but the two you have defined are actually outside of the foundation area (and both in the same spot).
If you actually did get that code from the foundation generator, the issue is not reproducible to me, and I'd like to hear how you created it.

If you coded that manually and just painted in the generator for illustration purposes, I suggest using the generator's code next time. Wink

(Note that you also had superfluous outline cells which I did not add.)
Forum Rules

(01.06.2011, 05:43:25)kenosis Wrote: Oh damn don't be disgraced again!

(25.06.2011, 20:42:59)Nighthawk Wrote: The proverbial bearded omni-bug may be dead, but the containment campaign is still being waged in the desert.
Reply
#3
Wow! That was a faster response then I expected. Smile

Crap, I did not copy all the code. There is 12 Foundation.X missing. This was the full code. But that does not matter it looks as if the problem is that I keep getting "-3". A little further down I attempt to type how I did it.
Code:
Foundation = Custom
Foundation.X = 5
Foundation.Y = 4
Foundation.0 = 1,-3
Foundation.1 = 2,-3
Foundation.2 = 0,-3
Foundation.3 = 1,-3
Foundation.4 = 2,-3
Foundation.5 = 3,-3
Foundation.6 = 4,-3
Foundation.7 = 0,-3
Foundation.8 = 1,-3
Foundation.9 = 2,-3
Foundation.10 = 3,-3
Foundation.11 = 4,-3
Foundation.12 = 1,-3
Foundation.13 = 2,-3
FoundationOutline.Length = 28
FoundationOutline.0 = -1,-3
FoundationOutline.1 = 0,-3
FoundationOutline.2 = 1,-3
FoundationOutline.3 = 2,-3
FoundationOutline.4 = 3,-3
FoundationOutline.5 = 4,-3
FoundationOutline.6 = 5,-3
FoundationOutline.7 = -1,-3
FoundationOutline.8 = 0,-3
FoundationOutline.9 = 3,-3
FoundationOutline.10 = 4,-3
FoundationOutline.11 = 5,-3
FoundationOutline.12 = -1,-3
FoundationOutline.13 = 5,-3
FoundationOutline.14 = -1,-3
FoundationOutline.15 = 5,-3
FoundationOutline.16 = -1,-3
FoundationOutline.17 = 0,-3
FoundationOutline.18 = 3,-3
FoundationOutline.19 = 4,-3
FoundationOutline.20 = 5,-3
FoundationOutline.21 = -1,-3
FoundationOutline.22 = 0,-3
FoundationOutline.23 = 1,-3
FoundationOutline.24 = 2,-3
FoundationOutline.25 = 3,-3
FoundationOutline.26 = 4,-3
FoundationOutline.27 = 5,-3

Anyways, the code you posted worked just fine... I am not to sure what you did to make it work. Do you have to hit that generate outline button that is next to the clear cells button?

As far as my proses when I use the generator is as follows. First I set the base foundation, then I left click for the bright green spots (like shown in the pic in my first post) to make the foundation I want. Then I clrt click for the orange box's filling in the un-marked squares. Then I just copy and past the code into artmd .ini. Is there a specific order that I have to click to make it work right? What web browser is required for this?


I have another problem... Yes you guys might want to take some pain pills... I am probably one of the worse coders you will come across. So I will have to say I am sorry, in advance, for how annoying I am going to be wail I play with Ares, new code always baffles my mind.

And its driving me nuts. Maybe this is just me trying to make the trench logic work in a way it was not meant to. I want to re-create the grenades/flame/ext. only clear buildings like C&C3 has. But it seems as if it is impossible to make it only work for a few specific projectiles. Every projectile hits the units inside, even if I set "SubjectToTrenches=yes" on every projectile I want to not hit the units bunkered.

This is my projectile code. SubjectToTrenches= is set to no as you can see. how ever it seems as if that tag is ignored... Could it be from the stuff that I have put in the buildings rules?
Code:
[GrenPro]
Image=120MM
Arcing=true
SubjectToTrenches=no
SubjectToCliffs=yes
SubjectToElevation=yes
SubjectToWalls=yes

This is the code for one of the buildings that I am testing with. I am not to sure witch tags I need... if any... I say if any, because I do not know if "SubjectToTrenches=no" will make it so the projectile will hit the unit inside wither or not the building has any tags telling the game if it can hit units that are bunkered. I have play with multiple settings and variables to try and make this work, and nothing seems to be responding the way i would like. I have read the documentation about how it works, and am still not understanding it.

I have "UC.PassThrough=" set so low because every unit's projectile was hitting the units bunkered even the ones I did not want to, Even when I had set projectile to "SubjectToTrenches=yes ". do these tags on the building override the "SubjectToTrenches=yes " tag? (Note* It was not a 100% hit rate, it did follow the percent that I had placed.)

Code:
[CABUNK01];gs restoring this to proper state.  The buildable one is up in the soviet section
UIName=Name:CABUNK01
Name=Concrete Bunker 01
TechLevel=-1
Strength=2000
Insignificant=yes
Nominal=yes
;RadarInvisible=yes
Points=5
UC.PassThrough=0.001
UC.FatalRate=100
UC.DamageMultiplier=100
Armor=steel
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=15
MinDebris=5
DebrisAnim=Dbris3sm,Dbris4lg,Dbris4sm,Dbris6sm,Dbris7lg,Dbris7sm,Dbris8sm,Dbris10lg,Dbris10sm
;Selectable=no
;IsBase=no
BaseNormal=no ;psst....IsBase isn't a Rules flag
Sight=6 ; UC base values
ClickRepairable=no
CanBeOccupied=yes
MaxNumberOccupants=8
;DistributedFire=yes
CanOccupyFire=yes
LeaveRubble=yes
-RA2/YR GFX Depot Click here!
Reply
#4
I absolutely cannot reproduce the generator issue, sorry. Even manually adding the outline generates the expected code for me.
Which browser are you using? I'm on Firefox 3.6.3.
And no, there's no specific clicking order needed.

Can you explicitly confirm my code works for you, though? 'cause we've had two custom foundation issues pop up right away, and I'd like to be sure it's working as it should. Smile (The other one seems to have been caused by a RockPatch conflict.)

As for your PassThrough issues, you're trying to use the system for something it wasn't designed for - Garrison Clearing Projectiles are an existing, independent feature request which will be implemented in 0.5. The Urban Combat Damage Model Overhaul [Forum thread] [Issue #778], of which it is part, will provide further measures to achieve it even the complicated way.

PassThrough as it is has no way to affect all occupants at once, and thus cannot be used for a single-shot-clear.
  • SubjectToTrenches= solely governs whether the projectile overrides PassThrough to always have PassThrough=100%; SubjectToTrenches=no does not mean "no PassThrough" it means "use normal PassThrough" (no is the default).
  • UC.PassThrough is per-building for all weapons - the previously mentioned UC.DaMO will add a new flag to control to which degree a weapon can pass through (if at all), but this is not implemented yet.
    You can think of UC.PassThrough as "how easily can bullets penetrate this building?".
  • The PassThrough system as a whole is triggered by the presence of UC.PassThrough on the building; if the building has no PassThrough settings, all other related flags should not be parsed.
    (If they do get parsed regardless, file a bug. But the system was confirmed as working a while ago...)
I'm sorry the system can't quite achieve what you want yet, but as you can see, the specific feature you need is already scheduled for implementation. Smile
The vast majority of poll-participants (62.50%) has voted to push this back to 0.5, but you are, of course, free to advocate for an earlier inclusion - whether the community accepts that (it will require delaying a different feature) is up to how persuasive you are. Wink
Forum Rules

(01.06.2011, 05:43:25)kenosis Wrote: Oh damn don't be disgraced again!

(25.06.2011, 20:42:59)Nighthawk Wrote: The proverbial bearded omni-bug may be dead, but the containment campaign is still being waged in the desert.
Reply
#5
Yes your code worked 100%! Smile

It looks like the generator is not friendly to google chrome. I just tryed in firefox and it is producing the corect code. So the problem was browser related. Bang head against wall

As far as the trench logic goes. I am glad to know that its not poor coding, but instead is some thing that just has not been implemented.

Thanks!
-RA2/YR GFX Depot Click here!
Reply
#6
Good to hear it works. As said, feel free to advocate earlier inclusion of those features, just be prepared that others might want other features to take priority.

As for Chrome...no idea why it fails. Should be cross-browser compatible... Lift eyebrow
Sorry for the confusion, I'll see if I can fix it for the next release - or at least put a note on it.
Forum Rules

(01.06.2011, 05:43:25)kenosis Wrote: Oh damn don't be disgraced again!

(25.06.2011, 20:42:59)Nighthawk Wrote: The proverbial bearded omni-bug may be dead, but the containment campaign is still being waged in the desert.
Reply




Users browsing this thread: 1 Guest(s)