View unanswered posts | View active topics It is currently Thu Mar 28, 2024 1:58 pm



Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
 [Tutorial]First Actor. 
Author Message
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: [Tutorial]First Actor.
I have yet to write up a more advanced tutorial on Wounds, offsets and Errors


Thu Apr 08, 2010 11:40 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: [Tutorial]First Actor.
♥♥♥♥ ♥♥♥♥ you're all dumb. STOP ANSWERING QUESTIONS WHEN YOU DON'T KNOW THE ANSWERS EVERYONE IT IS THE OPPOSITE OF HELPING.

Something without arms and legs is put into the "dying" status which makes it rapidly lose health (in normal situations this is good, something with no limbs is pretty useless from a tactical perspective and likely has a lot of blood leaking out of it (or in the case of a robot, shorting wires at the mangled points) so it makes sense) An actor without a head (that isn't an ACrab) should be set to "dead", but I think giving it health gives it back some wierd sort of AI. regardless, say you want something immobile for use in a turret or simmilar, there are a few workarounds.
1: use lua to reset the health to full each time
Drawbacks: this nets you an actor invulnerable to wounding, until it hits it's gibwoundlimit or gibimpulse limit, at which point it'll fall apart like normal.
2: use lua to trickle health back into it, at the same rate as it is lost
Drawbacks: this would be unreliable at different deltatimes unless you allowed for it, and is generally a bad idea anyway because of-
3: assign null limbs with no sprites atoms or whatever. also nullify the foot and hand groups.
Drawbacks: None. This is how we did it in the good old days, this is how you should do it now. If you don't want MOID rape just make the limbs unhittable.
If you want this for something that's just a torso to say make an entirely lua controlled actor, that's also fine.

I'm not entirely in favour of this tutorial because it deals pretty much entirely with resprites. You limit the reader to pixel dimensions etc and miss out only touch on the most important part: offsets. I'll come back and give a proper review once offsets etc are in (don't ♥♥♥♥ up :)), for now, C because at least it'd help boost confidence working with CC's .inis, but it's pretty useless for someone wanting to know what all those funny little variables are, orhow to make something bigger/smaller than default AHuman size.


Last edited by Geti on Fri Apr 09, 2010 12:50 am, edited 1 time in total.



Fri Apr 09, 2010 12:33 am
Profile WWW
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: [Tutorial]First Actor.
Section 3.1 Offsets.

I have restricted them for now because it's their first actor, I'll probably write something up on changing the dimensions and such.


Fri Apr 09, 2010 12:39 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: [Tutorial]First Actor.
Apologies, missed it. After reading through more fully, I'd give it a tentative B+. You're still saying a few misleading things, but they're minor. The colours hurt readability quite a bit though.
Also, for the sake or readability, I'd move the giant chunks of code to pastebin.


Fri Apr 09, 2010 12:48 am
Profile WWW
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: [Tutorial]First Actor.
Amends noted, will happen.
Also, tell me the misleading parts.


Fri Apr 09, 2010 12:55 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: [Tutorial]First Actor.
PROBLEMS (imho etc etc)
    -The pixel dimensions parts.
      I know you make a note of it below, but from the start you are saying "must fit in an 11px box" etc, and you do this for all the sprites. The note should be up the top, explaining that they don't have to use the same dimensions and that how to set up the offsets will be explained later
    -Typos! Also english errors
      -GibImpulseLimit: missed the return by one letter, and cut "The" in half. I'd remove the return, personally.
      -Comma overuse: you say, things, like this too, often. Most of your commas are un-needed eg.
      Code:
      Anything that is not terrain can gib, meaning, can die.
      makes more sense as
      Anything that is not terrain can gib (here meaning, can die.)

      NB: to gib does not mean to die, it means to blow apart into smaller pieces. Death can occur from gibbing, but gibbing does not always occur upon death.
    -Copyof description is convoluted.
    -Velocity description wrong. It's in m/s afaik ie 20px/s, but i think the conversion for normal deltatime is 7px/s or something. anyway, it definitely isnt 8px/min
    -Legs thing implies exactly what told you was wrong a few posts up.
    -"Basic class of Cortex Command" implies to anyone who's done coding that AHuman is the base class, whereas it's a child of actor, which is a child of MOSRotating, which is a child of MOSprite, which is a child of MovableObject, which is a child of SceneObject, which isn't basic at all.
    -Gib offsets not Gob Offsets, typo
    -Offsets doesn't fulfil its purpose, or is at least misnamed. I'd call it "positioning an offset".
    -Add an offsets section. Describe how to change spriteoffsets correctly, and how most offsets work from where the spriteoffset is positioned etc. say "see below for a fuller list of the types of offsets".
    -you can use notepad to find lines. turn word wrap off, and then press ctrl+g and type the line number.
    -the wiki stuff has been ♥♥♥♥ up by word wrap in notepad most likely. there's a lot of extra returns. copy it again, use a better text editor like notepad++ etc, or at least turn word wrap off before copying.
that's it for now, probably more later if I feel like it.


Fri Apr 09, 2010 1:24 am
Profile WWW
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: [Tutorial]First Actor.
ok, Move the note, fix overuse of commas, offset fixing, fix description of gibbing, change basic class to simplest Actor class, typos, etc..
But the wiki part was copied directly off of the wiki, [before the massive spam started].


Fri Apr 09, 2010 1:35 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: [Tutorial]First Actor.
Doesnt matter, just fix the extra returns.
Code:
KEY:
0+ = Integer value from 0 to a number (limit not explored)
1+ = Integer value from 1 to a number (limit not explored)
0.0+ = Decimal value from 0 to a number (limit not explored)
->+ = Integer value from a negative number to a positive number (limit not explored)
-.>+ = Decimal value from a negative number to a positive number (limit not explored)
0/1 = Boolean, true = 1, false = 0 (trying other values nonsensical)
0.0-1.0 = Decimal value from 0.0 to 1.0 (trying other values not recommended)
TXT = Text, alphanumeric and ! " # $ % ' ( ) + , - . / : ; < = > ? [ \ ] ^ _ { | }
Check Base.rte/GUIs/Skins/MainMenu/smallfont.bmp for more strange characters.


AddAmmo
This is used for things you want to fire out of Rounds. It is also customarily used for any MOPixels, MOSParticles, and MOSRotatings that you may define, though I think AddEffect might also work for them. Works for MOPixels, MOSParticles, MOSRotatings, and AEmitters.

PresetName
The name of the thing, used for both in-script references as well as in-game names for buyable objects. TXT

ParticleCount
Used in Rounds to say how many of the defined particle you want to spawn per shot. 0+

Mass
How heavy the particle in question is. -.>+

RestThreshold
I believe this is the inertia threshold at which a particle settles, and I believe inertia is probably Mass X Velocity(instantaneous) ->+

LifeTime
How long in MS this particle will last after spawned. The particle simply disappears at the end, no gibbing or anything. 0+, -1 for theoretical infinity

Sharpness
How sharp this particle is. This is really only useful for MOSParticles and MOPixels.

HitsMOs
Does this object affect other MO's? 0/1

GetsHitByMOs
Is this object affected by other MO's with HitsMOs = 1? 0/1

Color
Color of the MOPixel, see Base.rte/Ammo.ini for exact syntax

Atom
Defines the collision point and material of an MOPixel or MOSParticle.

Material
Determines such things as bounce, density, etc. See Base.rte/Materials.ini for exact things affected and see Base.rte/Ammo.ini for examples.

Trailcolor
Color of the trail of an MOPixel, same as Color.

TrailLength
Length of the trail of an MOPixel in pixels. 0+

Shell
Object thrown out of the EjectionOffset on a HDFirearm.

FireVelocity
Velocity (ingame meters per second, 20px = 1 ingame meter) the Particle of a Round is spawned at. Ingame seconds fluctuate rapidly depending on how well the game is running. ->+

ShellVelocity
Velocity (ingame meters per second, 20px = 1 ingame meter) the Shell of a Round is spawned at. Ingame seconds fluctuate rapidly depending on how well the game is running. ->+

Separation
Variance in pixels the Particle of a Round will be spawned at in a line from the MuzzleOffset. Both in front and in back of the MuzzleOffset. ->+

SpriteFile
Sprite the MO will take. Uses FilePath = to point to the file. Remember to use / in your path instead of any \.

FilePath
The path, starting in the top directory of Cortex Command. Referring to a file without any .rtes or folders will simply look for it where CortexCommand.exe is.

FrameCount
The number of frames in your object. Setting it to 1 will cause Cortex to look for the exact name you specified in the FilePath. Setting to greater than 1 will cause Cortex to look for sprites ending in 000.bmp, 001.bmp, and xxx.bmp where xxx is the number of frames - 1, so that a FrameCount of 20 will look for 000.bmp through 019.bmp. 1+

SpriteOffset
Accepts Vector. Offset in pixels away from the BOTTOM RIGHT corner of your sprite. Remember that computers use the fourth quadrant for graphics, so the upper left corner is 0,0, going right is positive, going left is negative, going down is positive, going up is positive. Also the center of gravity of your MO (will rotate around this point). Each component (X or Y) is ->+

EntryWound
Accepts an emitter, or Null. The wound emitter that should be attached at the impact location when an MOPixel or MOSParticle hits with enough force to pierce the MO. Setting to null will cause Cortex to not attach a wound at all.

ExitWound
Same as EntryWound, but the wound that should be attached at the exit locaiton of an MOPixel or MOSParticle continues through the MO. Setting to null will cause Cortex to not attach a wound at all.

AtomGroup
Defines a group of collision Atoms for the MO. Much the same as Atom, but you have to define the density of the detecting atoms with Resolution and the depth from the edge of the sprite with Depth. Those two values are 0+ in pixels

DeepGroup
Same as AtomGroup, but for a different purpose. When a DeepGroup Atom touches terrain, it causes Cortex to clear the terrain the MO currently occupies. See rockets burrowing into the ground.

DeepCheck
Whether to check the DeepGroup or not.

JointStrength
The impulse strength of a joint to breakage. Most likely is measured in Mass X Velocity of the object colliding. 0+

JointStiffness
A multiplier for how much impulse is transferred through the joint to the parent object. If 0.5 and an attachment recieves 100 impulse, the parent would experience 50 impulse in the same direction. 0.0-1.0

JointOffset
Offset (Vector) of a Joint on the MO from the SpriteOffset. If your SpriteOffset X is -3 and your JointOffset X is -2, the full offset of your Joint is -5 from the bottom right corner.

DrawAfterParent
Whether to draw after the parent (on top of visually) or before (under visually) the attaching object. Doesn't quite work yet, but when it does, Attachments with DrawAfterParent = 0 will be drawn under the object it is attached to. 0/1

RoundCount
Number of rounds and tracers in this Magazine. 1+

RTTRatio
Number of RegularRounds to fire before firing a TracerRound. 0+

RegularRound
The round to use as the RegularRound

TracerRound
The round to use as the TracerRound

AddDevice
Begins the definition of a HeldDevice.

InstanceName
Depreciated. Use PresetName instead.

AddToGroup
Add to a group in the build menu. Also for the buy menu, but only Actors, Brains (special group, any actor placed here will be a brain), Bombs, Weapons, Tools, and Crafts.

RateOfFire
Rate of fire of Rounds, in rounds per minute. 0+

StanceOffset
Offset of the primary hand when not in sharp mode, from the body's SpriteOffset.

JointOffset
For HDFirearms, where the primary hand should be placed on the gun.

SupportOffset
Where the secondary hand should be placed on the gun.

AddGib
Begins the definition of a Gib. Must be AddGib = Gib.

GibWoundLimit
Number of wounds this MO can take before gibbing. 0+

GibImpulseLimit
Impulse this MO can take before gibbing. 0+

GlobalAccScalar
Gravity's affect on this MO. 0.5 is half gravity. -0.5 is half negative gravity. -.>+

AirResistance
Amount of this MO's velocity to subtract every tick. 0.1 would be 10% current lost per tick. -.>+

OrientToVel
Amount to orient this MO to it's velocity. 0 is no orientation, 0.5 is somewhat slowly, 1 is instantly. 0.0-1.0

EmissionAngle
Angle from emitter's current angle to emit. In degrees, 0 is right, -90 is down, 90 is up, 180 or -180 is left. You can use any angle, but those are most common.

ScreenEffect
Defines a glow should be attached to this MO. Glows are attached at their center to the MO's SpriteOffset, or in the case of MOPixels and MOSParticles, their atom. Most useful on MOPixels and MOSParticles because sometimes they'll be hidden behind MOSRotatings and the like.

BurstTriggered
Is this emitter off until the first burst? 0/1

EmittedParticle
The particle emitted in this definition.

BurstSize
The number of particles to emit at the burst. 0+

Spread
Spread in radians to throw emissions or gibs. 3.14 is a full circle around the original point.

PushesEmitter
Does this emission affect the velocity of the emitter (and therefore anything this emitter is attached to)? 0/1

EmissionEnabled
Are regular emissions (not burst) enabled? 0/1

EmissionsIgnoreThis
Causes emissions to ignore collisions with the parent and all of its parents. 0/1

ParticlesPerMinute
How many of the EmittedParticle to spawn per minute. Under 60, this becomes a random chance, as in 30 would cause a particle to spawn on average every other second but in reality means that every second there is a 50% chance of a particle being spawned. 0+

BurstScale
What to multiply the BurstSize, Spread, and Min/MaxVelocity of all emissions by when bursting. (Geti)Might only affect
velocities. 1+

BurstDamage
How much damage should this emitter do to attached Actors when bursting? (only affects actors) 0+

FlashOnlyOnBurst
Should the Flash only appear during a burst (as opposed to the entire time it is emitting)? 0/1

FireIgnoresThis
Causes gun fire to ignore collisions with the parent and all of its parents. Thus on most weapons, having the firing offset inside the gun isn't going to cause any problems. 0/1

LifeVariation
A multiplier for how much variance the LifeTime of an Emission of Gib can vary. Setting to 0.5 will allow the Emission or Gib to be 150% lived or 50% lived. 0.0-1.
done

Some of those could use some editing in hindsight. DrawAfterParent is only broken for limbs.


Fri Apr 09, 2010 1:51 am
Profile WWW
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: [Tutorial]First Actor.
Thanks, I was going to do that tomorrow, but you shortened that a lot.


Fri Apr 09, 2010 3:10 am
Profile

Joined: Fri Feb 18, 2011 4:42 am
Posts: 1
Reply with quote
Post Re: [Tutorial]First Actor.
Index.ini is having errors on lines 3 4 and 5 at the same time, and I can't comprehend the problem. I didn't do any coding (Just image editing) and Index.ini is showing this when I load it up in terminal. (Im on a mac, if this helps.)

/Applications/Cortex Command b24.app/Contents/Resources/DummyTemplate.rte/Index.ini: line 3: IncludeFile: command not found
/Applications/Cortex Command b24.app/Contents/Resources/DummyTemplate.rte/Index.ini: line 4: IncludeFile: command not found
/Applications/Cortex Command b24.app/Contents/Resources/DummyTemplate.rte/Index.ini: line 5: IncludeFile: command not found

:???:


Fri Feb 18, 2011 4:54 am
Profile

Joined: Mon Mar 12, 2012 6:06 am
Posts: 58
Location: Flyin through the Matrix
Reply with quote
Post Re: [Tutorial]First Actor.
Question, Is it possible to make an actor that doesnt have gibs?


Tue Mar 13, 2012 5:41 pm
Profile
User avatar

Joined: Tue Jun 11, 2013 6:28 pm
Posts: 61
Reply with quote
Post Re: [Tutorial]First Actor.
Sorry to ask a probably answered question, but what do we do for helmets?


Sat Nov 09, 2013 1:09 am
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: [Tutorial]First Actor.
Helmets are defined as an attachable.
Information about attachables can be found in this post.

However a good place to look how they are defined can be found inside of the coalition soldier .ini files.
Let me know if you can't find it!


Sat Nov 09, 2013 6:01 am
Profile

Joined: Tue Nov 05, 2013 10:39 pm
Posts: 7
Reply with quote
Post Re: [Tutorial]First Actor.
wow.. i knew mods were complicated but i didnt know they were this complicated... :0


Sat Nov 09, 2013 11:35 am
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: [Tutorial]First Actor.
Don't think about how complicated they, more so begin experimenting by changing values so you know what they do first.
If there's a variable which seems to change absolutely nothing you can ask what it does.

Experimenting and modding adds + 100% fun to this game since it's more or less a physics sandbox with ragdoll physics in it's current state.


Sun Nov 10, 2013 12:09 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 32 posts ]  Go to page Previous  1, 2, 3  Next

Who is online

Users browsing this forum: No registered users


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.586s | 16 Queries | GZIP : Off ]