Duke4.net Forums: weapon modding? - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

weapon modding?  "Where & How?"

#1

I've browsed through all the con files, and I've tinkered with them before (as far as using them to alter sprite numbers, enemy behaviors, etc, but (at least as far as I can tell) there doesn't seem to be anything to allow for the altering of weapon behaviors... namely Duke's. For enemies sure, since I can tell them what projectile to fire after it's been created/defined, but where is the scripting for what the player can fire? Altering the gun animations when the shots are fired would also be nice.

If there's any Tuts or Guides that's always helpful too. ;)

This post has been edited by wayskobfssae: 20 February 2011 - 12:07 AM

0

User is offline   The Commander 

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

#2

http://wiki.eduke32....efineprojectile
http://wiki.eduke32....efined_gamevars

This post has been edited by The Commander: 20 February 2011 - 12:12 AM

0

#3

View PostThe Commander, on Feb 20 2011, 03:10 AM, said:



Doesn't that just work for actor weapons though?

*edit* Reading gamevars now.

This post has been edited by wayskobfssae: 20 February 2011 - 12:14 AM

0

User is offline   The Commander 

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

#4

View Postwayskobfssae, on Feb 20 2011, 09:13 PM, said:

Doesn't that just work for actor weapons though?

*edit* Reading gamevars now.

No, it works for anything involving the shoot command.

e.g.
gamevar WEAPON#_SHOOTS YOUR_DEFINDED_CUSTOM_PROJECTILE 0
0

#5

Excellent, this appears to have everything I'm looking for, except for control over the animation of tiles - such as.. while I can just use defs to reassign a sprite to a different art tile number, what if I wanted its animation sequence (the gun or the projectile) to consist of a longer or shorter # of tiles, and animate through the frames at a different speed?

This post has been edited by wayskobfssae: 20 February 2011 - 02:57 AM

0

User is offline   CruX 

#6

Extending/shortening the amount of frames in a weapon animation can be done by changing the weapon's total time. Though including those frames (in addition to speeding up/slowing down the animation) has to be done by switching the weaponcount, then displaying it. It's not super-hard, but it is a tad more complicated than changing what the weapon shoots. If you'd like some example code, just lemme know.
0

#7

First you show make the weapon animation so you know how long you want the animations to last. Then you play a little with the Pre-defined commands to make the animations fit.
0

#8

Yes, any code samples would be most appreciated.

I was able to get far enough to do what I needed to for a little side-project that I did as a favor to somebody, but I ran into a couple weird snags that I'll bring up when I have more time. Right now I'm chasing a deadline.
0

User is offline   Danukem 

  • Duke Plus Developer

#9

In the past, I have used the standard weapon system for making weapon mods and it has worked pretty well. However, it has some frustrating limitations. If I were to make another mod with a new set of weapons, I would probably dump the whole hardcoded system and make my own.

There's actually no need to use any of it. You can lock the player's current weapon to 0 (the mighty boot) and then use gamevar manipulation, shoot commands and screen drawing commands etc. to create different weapons with much greater flexibility.
0

#10

That's a pretty good idea.The pre-defined commands have some annoying limits.
0

Share this topic:


Page 1 of 1
  • 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