Duke4.net Forums: CON Coding for Human Trooper - Duke4.net Forums

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

CON Coding for Human Trooper  "CON Coding for Human Trooper created by Cage"

#1

Hello everyone.

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"

Posted Image

Attached File  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

1

User is offline   Jimmy 

  • Let's go Brandon!

#2

For the most part this character should have the same AI as the Assault Trooper.
0

#3

View PostCaptain Awesome, on 02 February 2013 - 12:44 PM, said:

For the most part this character should have the same AI as the Assault Trooper.


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

2

User is offline   DNSKILL5 

  • Honored Donor

#4

I think he'd act exactly like the Assault Trooper, the frames where he's shooting upward/downward I think were unused even in LameDuke (I think it was a feature they were planning, but decided not to do it).. So, I'd say just change the Assault Trooper's graphics, and changing the sound effects may be a good idea also.
2

User is offline   Hank 

#5

I am posting the link for basic con coding here too
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 :P
0

#6

View Postgerolf, on 02 February 2013 - 02:05 PM, said:

I think he'd act exactly like the Assault Trooper, the frames where he's shooting upward/downward I think were unused even in LameDuke (I think it was a feature they were planning, but decided not to do it).. So, I'd say just change the Assault Trooper's graphics, and changing the sound effects may be a good idea also.



Hey, great idea :P
0

User is offline   DNSKILL5 

  • Honored Donor

#7

You're also not going to need to use the one's of him shooting the gun, unless you edited the CON to have more frames or something.

I've realized you may need to remove the Assault Trooper's crouching feature.
0

#8

View Postgerolf, on 03 February 2013 - 08:11 AM, said:

You're also not going to need to use the one's of him shooting the gun, unless you edited the CON to have more frames or something.

I've realized you may need to remove the Assault Trooper's crouching feature.


How? Can you tell me please?
0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#9

View PostMikko Pekkola, on 03 February 2013 - 09:18 AM, said:

How? Can you tell me please?

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.
0

User is offline   Hank 

#10

View PostMikko Pekkola, on 03 February 2013 - 09:18 AM, said:

How? Can you tell me please?

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

2

User is offline   Mark 

#11

Easier said then done. I've been trying to remove certain sections of the pig cop code so my replacement works properly. Lots of trial and mostly error.
0

User is offline   Hank 

#12

View PostMark., on 04 February 2013 - 04:51 AM, said:

Easier said then done. I've been trying to remove certain sections of the pig cop code so my replacement works properly. Lots of trial and mostly error.


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.
0

User is offline   Jimmy 

  • Let's go Brandon!

#13

Yeah I wouldn't recommend using another actor as a base until you really know what you're doing. It's not bad, however, to look at another actor and use pieces while you're CONSTRUCTING a new actor. Good code requires attention.
0

User is offline   Mark 

#14

Being the lazy old dog that I am, I took what I thought would be the easier path. Instead of having to program every single aspect of the new enemy including A.I. I was willing to get by just with replacing the pig cop. All I really wanted to do was get rid of the dive and diveshoot actions because my new model can not make use of those. I got lucky in replacing the newbeast and sentry drone with new models and sounds because my animations matched closely enough with the originals. I didn't need to remove anything.

This post has been edited by Mark.: 04 February 2013 - 05:20 PM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #15

View PostCaptain Awesome, on 04 February 2013 - 04:16 PM, said:

Yeah I wouldn't recommend using another actor as a base until you really know what you're doing. It's not bad, however, to look at another actor and use pieces while you're CONSTRUCTING a new actor. Good code requires attention.

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.
0

User is offline   Jimmy 

  • Let's go Brandon!

#16

Oh definitely. It's really just the early version of the Assault Trooper, so it should use the same basic code. But my point was that if you're not an experienced coder, just copying and pasting a whole actor is going to do nothing to help you, and a lot to confuse you.
2

#17

View PostCaptain Awesome, on 04 February 2013 - 09:06 PM, said:

Oh definitely. It's really just the early version of the Assault Trooper, so it should use the same basic code. But my point was that if you're not an experienced coder, just copying and pasting a whole actor is going to do nothing to help you, and a lot to confuse you.



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

0

#18

But first: Do i need to type "HTROOP/OLDTROOP CODE" or "TROOP/HTROOP CODE" or how?
0

User is offline   Hank 

#19

View PostMikko Pekkola, on 08 February 2013 - 05:46 AM, said:

But first: Do i need to type "HTROOP/OLDTROOP CODE" or "TROOP/HTROOP CODE" or how?

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
0

#20

View PostHank, on 08 February 2013 - 06:09 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


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

0

User is offline   Hank 

#21

I am stuck home all day, so feel free to ask.

Main thing, enjoy it. I love programming. :P
1

#22

Wait a minute.

do i need to use these "action" things for "MyCoolTrooper" and where?
0

User is offline   Hank 

#23

View PostMikko Pekkola, on 08 February 2013 - 06:40 AM, said:

Wait a minute.

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.
0

#24

View PostHank, on 08 February 2013 - 07:23 AM, said:

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.


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

0

User is offline   Hank 

#25

View PostMikko Pekkola, on 08 February 2013 - 07:28 AM, said:

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?

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. :P You do not have to, but it is a good practice.
0

#26

And what about the frame of Human Trooper shooting upward/downward, do i have to leave it "unused" or something? What gerolf told me, that frame of Human Trooper shooting upward/downward is unused even in LameDuke
0

User is offline   Kyanos 

#27

"do i have to leave it "unused" or something?"

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.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#28

Those frames doesn't make much sense anyway. I mean, if you are flying above the enemy, you would expect to see the gun being aimed on your direction. It could only possible work if it was aiming at another actor...
0

#29

I was asking Hank
-2

User is offline   Mikko 

  • Honored Donor

#30

That's a weird thing to say..
2

Share this topic:


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options