CON Coding for Human Trooper "CON Coding for Human Trooper created by Cage"
#1 Posted 02 February 2013 - 10:44 AM
I'll need your help in the CON Coding for Human Trooper created by Cage from those, who know something about Con Coding.
I'll be including a picture of the sheet and an .ART file in RAR format, it's named "Human Trooper.rar"
Human Trooper.rar (66.9K)
Number of downloads: 270
This will be for my own project for DOS Duke
This post has been edited by Mikko Pekkola: 02 February 2013 - 10:47 AM
#2 Posted 02 February 2013 - 12:44 PM
#3 Posted 02 February 2013 - 12:53 PM
Captain Awesome, on 02 February 2013 - 12:44 PM, said:
Right. i'll need to tell this to Cage and then i'm gonna practice this with the Duke Nukem CON editor.
Practice makes perfect, right?
This post has been edited by Mikko Pekkola: 02 February 2013 - 12:54 PM
#4 Posted 02 February 2013 - 02:05 PM
#5 Posted 02 February 2013 - 02:07 PM
http://wiki.eduke32.com/wiki/Confaq42
The link I gave before on the other thread was incorrect, actually a dublicate from another post.
The model you've got looks very good, so now you need to make model come alive
#6 Posted 03 February 2013 - 01:34 AM
gerolf, on 02 February 2013 - 02:05 PM, said:
Hey, great idea
#7 Posted 03 February 2013 - 08:11 AM
I've realized you may need to remove the Assault Trooper's crouching feature.
#8 Posted 03 February 2013 - 09:18 AM
gerolf, on 03 February 2013 - 08:11 AM, said:
I've realized you may need to remove the Assault Trooper's crouching feature.
How? Can you tell me please?
#9 Posted 03 February 2013 - 09:38 AM
Mikko Pekkola, on 03 February 2013 - 09:18 AM, said:
http://wiki.eduke32.com/wiki/Confaq42
You need to read over that then learn how to find the "state" that Assault Trooper calls for ducking then disable it.
#10 Posted 03 February 2013 - 09:46 AM
Mikko Pekkola, on 03 February 2013 - 09:18 AM, said:
I'll try ...
ai AITROOPDUCKING ATROOPDUCK TROOPSTOPPED faceplayer
you'll find this code on around line 1976, in the game.con file. Trace it, the ai function, back to all calls, and make sure the 'actor' does not act with the code.
for example
ifcansee { ifmove TROOPRUNVELS ifpdistl 1596 ai AITROOPDUCKING ifp phigher { ifceilingdistl 128 { } else ifactornotstayput ai AITROOPJETPACK break } else ifrnd 2 { ifspritepal 21 ifpdistg 1596 { ai AITROOPHIDE break } ifbulletnear { ifrnd 128 ai AITROOPDODGE else ai AITROOPDUCKING break } } }
where it reads ifpddistl 1596 ai AITROOPDUCKING, will give you an error, because the new actor does not have that ai. You need to re-write this statement, or delete the if statement.
Besides the ducking ai, there are other ai routines, like jet pack, pal 21, and so on, that also will need to be addressed.
To follow what I just wrote, I think you need to study and understand the con code first. (You have been given the same link of the tutorial from Mblackwell, Cody and myself, there is a reason for it)
Start small, alter simple sprites first and grow methodically into actor code.
This post has been edited by Hank: 03 February 2013 - 01:09 PM
#11 Posted 04 February 2013 - 04:51 AM
#12 Posted 04 February 2013 - 05:31 AM
Mark., on 04 February 2013 - 04:51 AM, said:
Wait a minute! I did not say to alter a given actor. It is far easier, for me anyway, to make a new useractor and methodically add features to it. And like you I figured that out the hard way.
Still, someone suggested to use the trooper as a base. It's the most complex of all actors. On the plus, once you are through it, you pretty much know the con code, minus extremely frustrating way to learn, for people with my temper.
#13 Posted 04 February 2013 - 04:16 PM
#14 Posted 04 February 2013 - 05:13 PM
This post has been edited by Mark.: 04 February 2013 - 05:20 PM
#15 Posted 04 February 2013 - 08:10 PM
Captain Awesome, on 04 February 2013 - 04:16 PM, said:
In this case, it's more that the art sets align pretty closely. It's much harder to write something from scratch than to modify something existing, if you are capable of both.
#16 Posted 04 February 2013 - 09:06 PM
#17 Posted 08 February 2013 - 05:03 AM
Captain Awesome, on 04 February 2013 - 09:06 PM, said:
I think he's right. I'll keep on practicing in order to get Human Trooper to work correctly and if i won't be able to get it work right, i will be asking for more help from you and we could do it together.
And i have the Duke Nukem CON Editor and which is shortened "dnce"
This post has been edited by Mikko Pekkola: 08 February 2013 - 05:04 AM
#18 Posted 08 February 2013 - 05:46 AM
#19 Posted 08 February 2013 - 06:09 AM
Mikko Pekkola, on 08 February 2013 - 05:46 AM, said:
In which context? The forward slash is never used in a variable name.
You should start with:
useractor enemy MyCoolTrooper
{
your code
}
enda
and go here ...
http://wiki.eduke32...._a_useractor.3F
#20 Posted 08 February 2013 - 06:30 AM
Hank, on 08 February 2013 - 06:09 AM, said:
You should start with:
useractor enemy MyCoolTrooper
{
your code
}
enda
and go here ...
http://wiki.eduke32...._a_useractor.3F
Thanks, i'll practice with, what you mentioned.
And in this context, when i read about Assault Trooper code, there read like this "TROOP/LIZTROOP CODE"
This post has been edited by Mikko Pekkola: 08 February 2013 - 06:31 AM
#21 Posted 08 February 2013 - 06:35 AM
Main thing, enjoy it. I love programming.
#22 Posted 08 February 2013 - 06:40 AM
do i need to use these "action" things for "MyCoolTrooper" and where?
#23 Posted 08 February 2013 - 07:23 AM
Mikko Pekkola, on 08 February 2013 - 06:40 AM, said:
do i need to use these "action" things for "MyCoolTrooper" and where?
Every moving actor needs action sequences
http://wiki.eduke32....is_an_action.3F
here is a sample
action ASHARKCRUZING 0 8 5 1 24
The action(s) need to be defined before the actor itself, so the program can 'read' and work with it.
#24 Posted 08 February 2013 - 07:28 AM
Hank, on 08 February 2013 - 07:23 AM, said:
http://wiki.eduke32....is_an_action.3F
here is a sample
action ASHARKCRUZING 0 8 5 1 24
The action(s) need to be defined before the actor itself, so the program can 'read' and work with it.
so, do i need to put action sequences when i begin to create the actor and then put useractor etc. after that?
do i have to put action sequence like this: "action AMYCOOLTROOPERWALKING" for example?
This post has been edited by Mikko Pekkola: 08 February 2013 - 07:29 AM
#25 Posted 08 February 2013 - 08:50 AM
Mikko Pekkola, on 08 February 2013 - 07:28 AM, said:
do i have to put action sequence like this: "action AMYCOOLTROOPERWALKING" for example?
Yes, to both.
As a side note, the (user)actor is the last item defined in the script, before that you write all its functions, as in action, state, ai etc.
Also, you used the customary naming convention AACTORNAMEACTIONNAME, so your code will be easier to follow by other programmers, I am impressed. You do not have to, but it is a good practice.
#26 Posted 08 February 2013 - 09:40 AM
#27 Posted 08 February 2013 - 10:37 AM
Good question. The beauty of coding is that no, you never "HAVE" to do anything, while there are certain guidelines and conventions that we all try to stick to, you have the freedom to use or not use any frames you have.
Now to the second answer to your question. If persay, you have decided to edit an existing actor then you are limited in certain areas. Things ( a lot of things everywhere ) have been hardcoded engine side to work as they always have in DOS Duke. I recommend creating your own user actor whenever possible to avoid hardcoded tiles, stay above tile 5120 ( ? I think it 5120 ) the max limit of the original tiles.