Duke4.net Forums: Starting out, some questions - Duke4.net Forums

Jump to content

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

Starting out, some questions  "mostly about what is and isn't possible with the engine"

User is offline   MisterMano 

#1

Hello everyone. I'm starting out and have been thinking about making a small mod/conversion for Duke Nukem 3D, making it more of a first person RPG, like Elder Scrolls, but nothing too big at first.
Also I'm not worried about graphics, as my main concern will be performance, since I intend to run it on a Dingoo A320 handheld
But, before I start out, I'd like to ask some questions:

1- Is it possible to go back to previously played levels? Say, you finished level 1, started level 2, is there a way to make you go back to level 1?

2- Could I make the player have a regenerating magic pool? Basically, it'd be a shared ammo type that recovers over time.

3- Can I add secondary actions for any weapon (parrying with a melee, for instance)?

4- Is there a way of making a level up system where the player allocates the points? I'm thinking about 3 attributes: strength (for weapon damage), intelligence (magic pool and magic damage) and health.

5- If the above can be done, could I bring up a level up window as soon as the player levels up?

6- Is it possible to add money and shops (or buyable items, for that matter)?

7- Is it possible to replace a weapon with a more powerful version of it (like in Heretic)?

That's all I can think of right now, hope it's not too much
0

User is offline   Danukem 

  • Duke Plus Developer

#2

All of those things can be done using the scripting system in eduke32. Some are more involved than others. The script files are the one with the CON extension, and there is a scripting guide on the wiki: http://wiki.eduke32.com/wiki/Scripting

You should get Duke 3D with eduke32 running on your handheld before you worry about the scripting stuff.
0

User is offline   MisterMano 

#3

Thanks for the scripting guide, that's sure to come in handy

Also, the handheld already runs Duke 3D, so that's not something to worry about :)
http://dingoowiki.co...p?title=Eduke32

0

User is offline   Zaxtor 

#4

You can make example a sprite (custom made effector) in a sector that if u walk in.
ur hp regen until u step out.

Also ammo regen works too,
My mods has em.

Like that infinite chain gun regen.
means u never run out in Oblivion.

Also slow regenerating ammo of the 10th weap.

Is not hard.
0

User is offline   MisterMano 

#5

Nice to know that, time to get my hands dirty then
0

#6

 MisterMano, on 10 July 2011 - 12:44 PM, said:

Nice to know that, time to get my hands dirty then


Well yeah. I think that CON can modify almost every aspect of the game itself, down to the camera and such. Not sure what it can't do, however. Powerful as the language is though, I personally feel it's a mess to read..
1

User is offline   The Commander 

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

#7

@MisterMano

This mod here for eduke32 is RPG based, download it and have a look though it.
(There are probably other mods but this is the one that came to mind)

http://naferia.duke4.net/

EDIT: A couple of DeeperThoughts mods do have RPG elements in them.

This post has been edited by The Commander: 11 July 2011 - 04:10 PM

0

User is offline   TerminX 

  • el fundador

  #8

 Ryan Cordell, on 10 July 2011 - 03:36 PM, said:

Well yeah. I think that CON can modify almost every aspect of the game itself, down to the camera and such. Not sure what it can't do, however. Powerful as the language is though, I personally feel it's a mess to read..

Yeah, it's definitely a mess. The syntax of the various commands is pretty inconsistent between the varying ways you interact with different hard coded stuff. Such is the kind of mess you end up with when you're trying to support every Duke3D or EDuke mod ever made. :)
0

User is offline   MisterMano 

#9

 The Commander, on 11 July 2011 - 04:06 PM, said:

@MisterMano

This mod here for eduke32 is RPG based, download it and have a look though it.
(There are probably other mods but this is the one that came to mind)

http://naferia.duke4.net/

EDIT: A couple of DeeperThoughts mods do have RPG elements in them.

Thanks, I'll take a look at its .CON files and see if I can learn a thing or two from him.

Right now, my main goal is to make these work, in no particular order:
1- Create an event to send the player to XX map (shouldn't be hard, I mean, if there's a cheat code that does this...)
2- Create a working level up system
3- Have 2 magic attacks with shared, regenerative ammo (magic pool, maybe i should use something like "ifp isalive > regen code")
0

#10

 The Commander, on 11 July 2011 - 04:06 PM, said:

@MisterMano

This mod here for eduke32 is RPG based, download it and have a look though it.
(There are probably other mods but this is the one that came to mind)

http://naferia.duke4.net/

EDIT: A couple of DeeperThoughts mods do have RPG elements in them.


I was considering mentioning NR to him and giving answers used in it to some of his examples, but I figured I'd have been tooting my horn too much. o.o Thanks for bringing it up anyways though, Commander. XD
0

User is offline   MisterMano 

#11

I'm doing something wrong and I can't quite find out what it is:
Either the game isn't reading/finding my .CON file (which I really believe to be the problem) or my coding is wrong.

The .CON's just these 2 lines and I named it TEST1.CON. My mod folder is cleverly named testmod. :(
//Brackets {} didn't help
ifp pjumping addammo PISTOL_WEAPON 15
ifp runningback addammo PISTOL_WEAPON 20

//Also tried EVENT_GAME, but it didn't work either
onevent EVENT_DISPLAYREST
  ifp pjumping addammo PISTOL_WEAPON 15
  ifp runningback addammo PISTOL_WEAPON 20
endevent

When I load up eduke32, I select the folder where it is but the commands don't work. Putting it inside the autoload folder and enabling it while loading with or without a custom content folder didn't work either.

Help pretty please?
0

User is offline   Danukem 

  • Duke Plus Developer

#12

Those lines should be placed in the APLAYER actor, not in event code (before any advanced coders correct me, note that I am aware of other methods and I'm trying to keep it simple for him).

Before you start editing CONs, you should have GAME.CON, USER.CON, and DEFS.CON (the three CON files from standard Duke Nukem 3D) extracted from DUKE3D.GRP and in the same folder with eduke32.exe

By default, GAME.CON is the main CON file. Open that file and look at the first few lines. Note that the other two CONs are included by it. If you like, you could add a line in GAME.CON that includes yours as well. Or, you can edit GAME.CON to add your code. This is what I recommend when you are learning and doing experiments.
0

User is offline   MisterMano 

#13

Thanks again for the help, DeeperThought

I've managed to get a regen code working, though I don't think this is the best way to do it, as it misses some ticks. Using 999 in the ifvarvarg or ifvarvare 0 ends up never returning true. Is there some sleep or wait command that can be used instead?
gamevar temptick 0 0
onevent EVENT_DISPLAYREST
	ifp palive {
		getticks temptick
		modvar temptick 1000
		ifvarvarg temptick 998 addphealth htoadd
		//htoadd is defined in my defs.con
	}
endevent

Using that same piece of code inside the player actor didn't work. Tried it inside and outside one of the actions, with and without the ifp palive, to no avail though.

More questions:
1- Is there a way to use a gamevar instead of a defined var for the addphealth?
2- If I want to change the value of the htoadd define, multiplying it by a gamevar, what would i have to do?

Hope i'm not being too much of a hassle with all these questions :(
0

User is offline   Danukem 

  • Duke Plus Developer

#14

getticks may be useful for debugging sometimes, but it's definitely not what you want here, nor do you want to put the code in a display event.

Remember that actors, including the player, execute their code once per tic. There are 30 tics per second. With these two facts in mind, it is easy to write some regen code for the player. Let's say you want it to regenerate one point per second:

gamevar REGEN 0 1 // declare the variable

actor APLAYER MAXPLAYERHEALTH PSTAND 0 0

addvar REGEN 1
ifvarg REGEN 29
{
     setvar REGEN 0
     ifphealthl MAXPLAYERHEALTH
     {
          addphealth 1
          sound DUKE_HARTBEAT
     }
}

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