Author Topic: Modding Questions for my upcoming project  (Read 33503 times)

Offline Victorious_Games

  • Raptor
  • ***
  • Posts: 123
  • T:REP 397
  • I AM TUROK!!
    • View Profile
Modding Questions for my upcoming project
« on: July 05, 2018, 10:52:51 AM »
These are some questions I have about modding Turok 2. I wanted to ask about them first before I go trying to implement them. I didn't want to waste my time on impossible ideas.

Is there a way to to resize blood splat decals?
Is there a way to increase the firing rate for weapons?
Is there a way to make particle effects that are created by weapons loop forever?
Is there a way to have more then 1 firing animation for weapons such as if I press the primary fire button you get one animation but if I press the alternate fire button ( the scope enable/disable button ) you get another firing animation?
Is there a way to change a monsters skin texture when it dies like if it's killed by the flamethrower it turns black?
Is there a way to make the fire that gets on a monster when it's burned by the flamethrower to cover it's whole body and not just it's upper torso?
Is it possible to have a monster spawn another monster through scripts?
« Last Edit: July 05, 2018, 01:25:46 PM by Victorious_Games »
Turok 2 Ascension MODDB Page: https://www.moddb.com/mods/turok-2-ascension

Offline Drahsid

  • Endtrail
  • ****
  • Posts: 153
  • T:REP 557
  • That I be considered worthy
    • View Profile
Re: Modding Questions for my upcoming project
« Reply #1 on: July 05, 2018, 01:39:49 PM »
Is there a way to resize blood splat decals?
Yes, edit the particle.
Is there a way to increase the firing rate for weapons?
Yes, edit the animation, or alternatively, cut the animation off earlier in the weapons script.
Is there a way to make particle effects that are created by weapons loop forever?
You cannot make particles loop forever unless of course you just spawned another upon death.
Is there a way to have more then 1 firing animation for weapons such as if I press the primary fire button you get one animation but if I press the alternate fire button ( the scope enable/disable button ) you get another firing animation? Haven't we answered this?
From my understanding, I think this is what you want. I had a mag 60 with explosive secondary and bullet primary fire on left and right mouse click lol its a killer weapon but its been awhile though since I was focused on it xD.

This would be a script function you need to do a script, search for this through the scripts to understand.

if((self.Owner().Buttons() & BC_ALTFIRE) != 0)

Its actually applied to the ridingGun.txt in scripts folder that will help to understand some I believe look for ALTFIRE in that document.
Is there a way to change a monsters skin texture when it dies like if it's killed by the flamethrower it turns black?
I haven't looked into the monster code, but you could potentially to a similar thing to what they do with limbs.
Is there a way to make the fire that gets on a monster when it's burned by the flamethrower to cover it's whole body and not just it's upper torso?
Unless it's a part of the monster's animations, edit the particle.
Is it possible to have a monster spawn another monster through scripts?
ActorFactory.Spawn(), lookit the API.
« Last Edit: July 05, 2018, 01:40:51 PM by Drahsid »
Well that didn't work

Offline Victorious_Games

  • Raptor
  • ***
  • Posts: 123
  • T:REP 397
  • I AM TUROK!!
    • View Profile
Re: Modding Questions for my upcoming project
« Reply #2 on: July 05, 2018, 02:12:42 PM »
Hey thanks a lot man for the reply. But when I was asking about having more then one firing animation for a weapon I was talking about an actual animation and not just a secondary fire mode like my other thread was asking about. I understand exactly how to add that secondary fire mode but I was wondering if it was possible to have a second firing animation for that secondary fire mode or does the weapon have to use the same firing animation for both fire modes?

What is the particle for the blood splat decals? I haven't been able to find which one to edit.

Turok 2 Ascension MODDB Page: https://www.moddb.com/mods/turok-2-ascension

Offline Victorious_Games

  • Raptor
  • ***
  • Posts: 123
  • T:REP 397
  • I AM TUROK!!
    • View Profile
Re: Modding Questions for my upcoming project
« Reply #3 on: July 05, 2018, 10:09:50 PM »
Ok I understand how to make a new animation for the secondary fire modes.

My next question: Is there a way to tell in the scripts what type of ammo you are using?

Also how exactly do you cut the firing animation off in the weapon scripts to increase the firing rate?
Turok 2 Ascension MODDB Page: https://www.moddb.com/mods/turok-2-ascension

Offline Duke64

  • Administrator
  • *****
  • Posts: 1684
  • T:REP 6523
  • Sixty Four
    • View Profile
    • Duke64Nukem.com
Re: Modding Questions for my upcoming project
« Reply #4 on: July 06, 2018, 01:21:26 AM »
Ok I understand how to make a new animation for the secondary fire modes.

My next question: Is there a way to tell in the scripts what type of ammo you are using?

Also how exactly do you cut the firing animation off in the weapon scripts to increase the firing rate?

The type of ammo is defined in

defs>weaponinfo.txt

Weapon kWpn_Magnum
{
    offset                  "6 7 10"
    actor                   kActor_Wpn_Mag60
    defaultWeapon           FALSE
    owned                   FALSE
    allowUnderwater         FALSE
    allowLand               TRUE
    allowMultiplayer        TRUE
    icon                    "gfx/hud/weapons/h_w_mag60.png"
    ammo                    "Ammo_Bullet"
    ammoConsumption         1
    projectileParticle      kParticle_MagnumBullet
    charMeshIndex           kWpnChar_Mag60
   priority                8000
}

I wouldn't cut off firing animations there is a way you can make the firing animations speed up or any generally. Used it in my mods 'Fossil Cavern' and 'Turok lives again' scripted to fire fast.

    /*
    ==============================================================
    OnFire
    ==============================================================
    */
   
    void OnFire(void)
    {
        self.PlaySound("sounds/shaders/TOMMY.ksnd");
   self.AnimTrackComponent().ChangeSpeed(0.64f);

    }
   
    /*
« Last Edit: July 06, 2018, 01:32:54 AM by Duke64 »
Dinosaur Hunter
"Its time to make tracks"
"You are tiny grasshopper"
"Suck it down"
"Boo, No soup for you"
"Arrrgghhhh"
"I live again"

Offline Rok

  • Global Moderator
  • *****
  • Posts: 633
  • T:REP 1968
    • View Profile
Re: Modding Questions for my upcoming project
« Reply #5 on: July 06, 2018, 01:28:24 AM »
Did you change it to 0.64 on purpose lol. Oh you should maybe link those mods, here.

Turok Lives Again: https://turoksanctum.com/turok-lives-again/

Fossil Cavern: https://turoksanctum.com/fossil-cavern-v1/
« Last Edit: July 06, 2018, 01:29:09 AM by Rok »
Raptor Rok is metal.

Offline Victorious_Games

  • Raptor
  • ***
  • Posts: 123
  • T:REP 397
  • I AM TUROK!!
    • View Profile
Re: Modding Questions for my upcoming project
« Reply #6 on: July 06, 2018, 09:17:19 AM »
What I meant by "Is there a way to tell in the scripts what type of ammo you are using?" was how can I tell in the weapon scripts if I'm using normal shotgun shells or explosive shotgun shells.
Turok 2 Ascension MODDB Page: https://www.moddb.com/mods/turok-2-ascension

Offline Jay Doomed

  • Global Moderator
  • *****
  • Posts: 803
  • T:REP 2632
    • View Profile
Re: Modding Questions for my upcoming project
« Reply #7 on: July 06, 2018, 09:59:20 AM »
Sixty already said it I think. defs/weaponinfo. That's not in scripts its in the defs.
"Whatever it is, it doesn't belong in this world."

Offline Victorious_Games

  • Raptor
  • ***
  • Posts: 123
  • T:REP 397
  • I AM TUROK!!
    • View Profile
Re: Modding Questions for my upcoming project
« Reply #8 on: July 06, 2018, 10:31:08 AM »
Sixty already said it I think. defs/weaponinfo. That's not in scripts its in the defs.

I understand what he said but in the weapon scripts I need to be able to tell if the player is currently using normal shotgun shells or explosive shotguns shells. Is there a way to check which ammo type the player is using in the weapons scripts? I currently have the primary fire button shooting 1 shotgun shell and the secondary fire button shooting 2 shotgun shells. But the only way to get the secondary fire button to shoot 2 shotgun shells was to add a fireprojectile command that forces it to shoot the shotgun_bullet.particle. It works great for the normal shotgun shells but when using the explosive shotgun shells the shotgun fires 1 explosive shell and 1 normal shell. I need an if statement that will check if the player is using normal or explosive shotgun shells so that I can force it to shoot the proper projectile.

Also is there any way to make the alternate fire button loop the shooting animations for a weapon. For example the shotgun will not continuously shoot when holding down the alternate fire button like it does when holding down the primary fire button. Is there a way to fix this or is this something in the source? 
Turok 2 Ascension MODDB Page: https://www.moddb.com/mods/turok-2-ascension

Offline BehemothProgrammer

  • Endtrail
  • ****
  • Posts: 224
  • T:REP 791
    • View Profile
Re: Modding Questions for my upcoming project
« Reply #9 on: July 06, 2018, 07:01:55 PM »
someone :alien: me to help you so here I am.

No there's no way to tell what ammo type a weapon is currently set to. And no again  there's no way to detect if the alt fire button is being held down, but for every other button you can. (isn't that great?)
Turok 2 Co-Op Mod

QTurok | Turok: Mountain of the Sun | WolfenTurok 3D | and more...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal