Duke4.net Forums: Adding in quotes without overwrites - Duke4.net Forums

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

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

Adding in quotes without overwrites

User is offline   Ninety-Six 

  • 175

#1

(I'm honestly not sure if this belonged here or in the help me section)

Thread title, basically. I want to add in some additional Duke one-liners without replacing existing ones. Setting aside quality mashing for the moment, I simply want to learn the process. I didn't see any dedicated tutorials or breakdowns of the one-liner system. I'm sure they exist somewhere, but they're probably embedded and I don't know where to start searching. I did try reverse-engineering mods I know that pulled that off, but as usual looking at the con code made my brain melt. I grasped the concept of declaring the additional sound files exist (though I don't quite know how; lots of numbers there), but when it came to actually calling on them, I don't know how that works or where that happens.


Also I realize I'm approaching this situation from more of a middle/top-down position as opposed to a bottom-top approach like most tutorials are designed, but what can I say. It's easier for me to learn this way.

This post has been edited by Ninety-Six: 28 December 2018 - 11:14 AM

0

User is online   Zaxtor 

  • 1,675

#2

I looked into, doesn't say anything about it except

(if you refer to this)

CommbatMacro#0-9
These are the text macros used to send messages with "SHIFT+F1-F10", and yes, it is spelled that way. Here are the defaults:

CommbatMacro#0 = "An inspiration for birth control."
CommbatMacro#1 = "You're gonna die for that!"
CommbatMacro#2 = "It hurts to be you."
CommbatMacro#3 = "Lucky Son of a Bitch."
CommbatMacro#4 = "Hmmm....Payback time."
CommbatMacro#5 = "You bottom dwelling scum sucker."
CommbatMacro#6 = "Damn, you're ugly."
CommbatMacro#7 = "Ha ha ha...Wasted!"
CommbatMacro#8 = "You suck!"
CommbatMacro#9 = "AARRRGHHHHH!!!"


Doesn't say how to add nor change
User.con doesn't have this
Probably is hard coded or builtin the Duke engine messages.
Maybe (not sure) could be a way to add more)

Is mentioned in there telling the key to press to trigger
https://wiki.eduke32...on_file_options

Trequonia TC's Status:
Levels : 100% done - Textures : 100% done - Sounds : 100% done - Musics :100% done
Mod is finished, going to test it.
Trequonia's Official website
0

User is offline   Ninety-Six 

  • 175

#3

I appreciate it but I'm talking about his enemy gib one-liners (e.g. "holy shit!", "Damn I'm Good", "Blow it out your ass" etc) or his commentary lines ("This is a force to be reckoned with" etc., though I know those require additional map triggers)

This post has been edited by Ninety-Six: 28 December 2018 - 01:05 PM

0

User is online   Zaxtor 

  • 1,675

#4

O that.
I'll check

Trequonia TC's Status:
Levels : 100% done - Textures : 100% done - Sounds : 100% done - Musics :100% done
Mod is finished, going to test it.
Trequonia's Official website
0

User is online   Zaxtor 

  • 1,675

#5

Duke talking when you kill stuff is in there
You add extra stuff


(standard stuff )

state jib_sounds
ifrnd SWEARFREQUENCY
{
ifrnd 128
{
ifrnd 128
{
ifrnd 128
{
ifrnd 128
{
ifrnd 128
globalsound JIBBED_ACTOR12
else
globalsound JIBBED_ACTOR1
}
else
{
ifrnd 128
globalsound JIBBED_ACTOR9
else
globalsound JIBBED_ACTOR14
}
}
else
{
ifrnd 128
globalsound SMACKED
else
globalsound JIBBED_ACTOR2
}
}
else
{
ifrnd 128
globalsound MDEVSPEECH
else
globalsound JIBBED_ACTOR5
}
}
else
{
ifrnd 128
{
ifrnd 128
{
ifrnd 128
globalsound JIBBED_ACTOR11
else
globalsound JIBBED_ACTOR13
}
else
{
ifrnd 128
globalsound JIBBED_ACTOR3
else
globalsound JIBBED_ACTOR8
}
}
else
{
ifrnd 128
{
ifrnd 128
globalsound JIBBED_ACTOR6
else
globalsound JIBBED_ACTOR4
}
else
{
ifrnd 128
{
ifrnd 128
globalsound JIBBED_ACTOR10
else
globalsound JIBBED_ACTOR15

}
else
globalsound JIBBED_ACTOR7
}
}
}
}
ends




You add let say
in bold is the extra code added



state jib_sounds
ifrnd SWEARFREQUENCY
{
ifrnd 128
{
ifrnd 128
{
ifrnd 128
{
ifrnd 128
{
ifrnd 128
globalsound JIBBED_ACTOR12
else
globalsound JIBBED_ACTOR1
}
else
{
ifrnd 128
globalsound JIBBED_ACTOR9
else
globalsound JIBBED_ACTOR14
}
}
else
{
ifrnd 128
globalsound SMACKED
else
globalsound JIBBED_ACTOR2
}
}
else
{
ifrnd 128
globalsound MDEVSPEECH
else
globalsound JIBBED_ACTOR5
}
}
else
{
ifrnd 128
{
ifrnd 128
{
ifrnd 128
globalsound JIBBED_ACTOR11
else
globalsound JIBBED_ACTOR13
}
else
{
ifrnd 128
globalsound JIBBED_ACTOR3
else
globalsound JIBBED_ACTOR8
}
}
else
{
ifrnd 128
{
ifrnd 128
globalsound JIBBED_ACTOR6
else
globalsound JIBBED_ACTOR4
}
else
{
ifrnd 128
{
ifrnd 128
globalsound JIBBED_ACTOR10
else
globalsound JIBBED_ACTOR15

}
else
{
ifrnd 128
{
ifrnd 128
globalsound JIBBED_ACTORXX
else
globalsound JIBBED_ACTORXX


}
else
globalsound JIBBED_ACTOR7
}
}
}
}
ends


I think is like that


Is inside a state where all actors you "jib" from radius / exp damage
PS
Make sure theres not too much "{" and or "}"

this was done fast just to show an example
You copy a segment and add higher number and or new sounds without hurting older ones

Trequonia TC's Status:
Levels : 100% done - Textures : 100% done - Sounds : 100% done - Musics :100% done
Mod is finished, going to test it.
Trequonia's Official website

This post has been edited by Zaxtor: 28 December 2018 - 01:45 PM

0

User is offline   Ninety-Six 

  • 175

#6

I'm a bit confused. Why are they in blocks of two like that? Are they two halves of the same sound, or...
0

User is online   Zaxtor 

  • 1,675

#7

they are 2 codes.

1 on top is standard

2nd is a copy with the added stuff

I copied from the game.con file.
I never really messed with that aside replacing codes on my mod.



the "state jib_sounds" with all the stuff is pretty right on top of the game.con file.

You "control+F" inside the con file and find the "state jib_sounds"

and you will see.
you add the extra and should work without messing up things.

More sounds, means more random it will choose.

Let say you blowup something you have 1 in 15 to play a certain sound example "Let god sort em out".

if your new "state jib_sounds" has 20-25 speech.
1/20 or 1/25 to hear a certain sound "Let god sort em out"

Trequonia TC's Status:
Levels : 100% done - Textures : 100% done - Sounds : 100% done - Musics :100% done
Mod is finished, going to test it.
Trequonia's Official website

This post has been edited by Zaxtor: 28 December 2018 - 06:22 PM

0

User is offline   Ninety-Six 

  • 175

#8

View PostZaxtor, on 28 December 2018 - 06:21 PM, said:

they are 2 codes.

1 on top is standard

2nd is a copy with the added stuff


I was specifically referring to this:

Quote

{
ifrnd 128
globalsound JIBBED_ACTOR11
else
globalsound JIBBED_ACTOR13
}


I don't understand why all these events are grouped in pairs.
0

User is online   Zaxtor 

  • 1,675

#9

probably is for some random stuff.

I know ifrnd is a random thing often associated with ifcount

probably else is there for either choosing 11 or 13.

Trequonia TC's Status:
Levels : 100% done - Textures : 100% done - Sounds : 100% done - Musics :100% done
Mod is finished, going to test it.
Trequonia's Official website
0

User is offline   Ninety-Six 

  • 175

#10

I also don't understand why it's all the same ifrnd number.

I'm just trying to figure out how this massive if/else statement works so I can seamlessly integrate and not screw it up.
0

User is online   Zaxtor 

  • 1,675

#11

me too I wonder why is all same.
But in game it works and when Duke guts monster he says random.

Maybe it gives equal chance to everything and game randomly choose the globalsound

Trequonia TC's Status:
Levels : 100% done - Textures : 100% done - Sounds : 100% done - Musics :100% done
Mod is finished, going to test it.
Trequonia's Official website
0

User is online   Trooper Dan 

  • Duke Plus Developer
  • 3,759

#12

What Zaxtor posted is pretty much unreadable without code tags, since there is no formatting. In the original GAME.CON, the ifrnd statements are arranged so that each quote has roughly the same chance of being played. If you want to add more one-liners, I would advice writing new code by randomizing a var and then using a switch statement with each case playing a different sound.
1

User is offline   Photonic 

  • 1,268

#13

I did my best to comment the code from GAME.CON state jib_sounds.
Spoiler


This post has been edited by Photonic: 29 December 2018 - 07:09 AM

0

User is offline   Ninety-Six 

  • 175

#14

So in regards to ifrnd 128, it rolls that every time it calls on it, and if it isn't equal or greater it hits "else".


Incidentally, just for clarity's sake, what's the function that would mean equal only?

Also, how does swearfrequency factor in? I mean, obviously it does I just don't see where it's called.


Seeing the code like this does help a lot to see how this giant tree works, but I notice there are more brackets than there were at the start. Were there more that were just cut off above swearfrequency?
0

User is offline   Photonic 

  • 1,268

#15

View PostNinety-Six, on 29 December 2018 - 11:45 AM, said:

So in regards to ifrnd 128, it rolls that every time it calls on it, and if it isn't equal or greater it hits "else".

opposite, less than or equal to, "ifrnd 0" is 1 per 255.

View PostNinety-Six, on 29 December 2018 - 11:45 AM, said:

Incidentally, just for clarity's sake, what's the function that would mean equal only?

ife = if equal, ifg = if greater than, also stuff like ifvare for variables instead of indexed numbers like SWEARFREQUENCY.

View PostNinety-Six, on 29 December 2018 - 11:45 AM, said:

Also, how does swearfrequency factor in? I mean, obviously it does I just don't see where it's called.

First line calls it, the rest of the code after is ignored when ifrnd returns > SWEARFREQUENCY.

View PostNinety-Six, on 29 December 2018 - 11:45 AM, said:

Seeing the code like this does help a lot to see how this giant tree works, but I notice there are more brackets than there were at the start. Were there more that were just cut off above swearfrequency?

Count them out from top to bottom { = +1, } = -1, you end up at 0.
0

User is offline   Ninety-Six 

  • 175

#16

View PostPhotonic, on 29 December 2018 - 12:37 PM, said:

opposite, less than or equal to, "ifrnd 0" is 1 per 255.

I'm confused.
0

User is offline   Firefly_Trooper 

  • 41

#17

View PostTrooper Dan, on 29 December 2018 - 02:21 AM, said:

What Zaxtor posted is pretty much unreadable without code tags, since there is no formatting. In the original GAME.CON, the ifrnd statements are arranged so that each quote has roughly the same chance of being played. If you want to add more one-liners, I would advice writing new code by randomizing a var and then using a switch statement with each case playing a different sound.


Like what I did for my file. This is what Trooper Dan had suggested, but without instruction "switch":

state jib_sounds
  ifrnd SWEARFREQUENCY
  { randvar TEMPFIX1 34
    ifvare TEMPFIX1 0 globalsound JIBBED_ACTOR1
    else ifvare TEMPFIX1 1 globalsound JIBBED_ACTOR2
    else ifvare TEMPFIX1 2 globalsound JIBBED_ACTOR3
    else ifvare TEMPFIX1 3 globalsound JIBBED_ACTOR4
    else ifvare TEMPFIX1 4 globalsound JIBBED_ACTOR5
    else ifvare TEMPFIX1 5 globalsound JIBBED_ACTOR6
    else ifvare TEMPFIX1 6 globalsound JIBBED_ACTOR7
    else ifvare TEMPFIX1 7 globalsound JIBBED_ACTOR8
    else ifvare TEMPFIX1 8 globalsound JIBBED_ACTOR9
    else ifvare TEMPFIX1 9 globalsound JIBBED_ACTOR10
    else ifvare TEMPFIX1 10 globalsound JIBBED_ACTOR11
    else ifvare TEMPFIX1 11 globalsound JIBBED_ACTOR12
    else ifvare TEMPFIX1 12 globalsound JIBBED_ACTOR13
    else ifvare TEMPFIX1 13 globalsound JIBBED_ACTOR14
    else ifvare TEMPFIX1 14 globalsound JIBBED_ACTOR15
    else ifvare TEMPFIX1 15 globalsound SMACKED
    else ifvare TEMPFIX1 16 globalsound JIBBED_ACTOR16
    else ifvare TEMPFIX1 17 globalsound JIBBED_ACTOR17
    else ifvare TEMPFIX1 18 globalsound JIBBED_ACTOR18
    else ifvare TEMPFIX1 19 globalsound JIBBED_ACTOR19
    else ifvare TEMPFIX1 20 globalsound JIBBED_ACTOR20
    else ifvare TEMPFIX1 21 globalsound JIBBED_ACTOR21
    else ifvare TEMPFIX1 22 globalsound JIBBED_ACTOR22
    else ifvare TEMPFIX1 23 globalsound JIBBED_ACTOR23
    else ifvare TEMPFIX1 24 globalsound JIBBED_ACTOR24
    else ifvare TEMPFIX1 25 globalsound JIBBED_ACTOR25
    else ifvare TEMPFIX1 26 globalsound JIBBED_ACTOR26
    else ifvare TEMPFIX1 27 globalsound JIBBED_ACTOR27
    else ifvare TEMPFIX1 28 globalsound JIBBED_ACTOR28
    else ifvare TEMPFIX1 29 globalsound JIBBED_ACTOR29
    else ifvare TEMPFIX1 30 globalsound JIBBED_ACTOR30
    else ifvare TEMPFIX1 31 globalsound JIBBED_ACTOR31
    else ifvare TEMPFIX1 32 globalsound JIBBED_ACTOR32
    else ifvare TEMPFIX1 33 globalsound JIBBED_ACTOR33
    else globalsound MDEVSPEECH
  }
ends


"JIBBED_ACTOR" from 16 to 33, are bonus quotes of the PSX and Caribbean version.

This post has been edited by Firefly_Trooper: 03 January 2019 - 11:03 AM

0

Share this topic:


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


All copyrights and trademarks are property of their respective owners. Instead of reading this text, you could be playing Ion Maiden! ;) © 2018 Voidpoint, LLC

Enter your sign in name and password


Sign in options