need help with runes

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
mr fiat
Frequent Poster Miles card holder
Posts: 858
Joined: Tue Jun 05, 2012 3:28 pm
Location: netherlands

need help with runes

#1

Post by mr fiat » Thu Jun 07, 2012 6:12 pm

so zandronum will get rid of all the skulltag related stuff but does that include the runes? I heard they are hardcoded into the exe, if they are being removed id like to know how to make runes or powerups that behave like runes, thanks in advance.

Twister
Under Moderation
Posts: 49
Joined: Mon Jun 04, 2012 1:48 pm
Location: Next door
Contact:

RE: need help with runes

#2

Post by Twister » Thu Jun 07, 2012 6:17 pm

On a related note, custom rune support.
Smart Cheese Technology

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: need help with runes

#3

Post by Torr Samaho » Thu Jun 07, 2012 6:44 pm

mr fiat wrote: so zandronum will get rid of all the skulltag related stuff but does that include the runes? I heard they are hardcoded into the exe, if they are being removed id like to know how to make runes or powerups that behave like runes, thanks in advance.
Since the runes are hardcoded they can't be moved out of the core files for the time being.

User avatar
mr fiat
Frequent Poster Miles card holder
Posts: 858
Joined: Tue Jun 05, 2012 3:28 pm
Location: netherlands

RE: need help with runes

#4

Post by mr fiat » Thu Jun 07, 2012 7:00 pm

Twister wrote: On a related note, custom rune support.
that would be cool indeed

User avatar
Ivan
Addicted to Zandronum
Posts: 2219
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: need help with runes

#5

Post by Ivan » Thu Jun 07, 2012 7:31 pm

Torr Samaho wrote:
mr fiat wrote: so zandronum will get rid of all the skulltag related stuff but does that include the runes? I heard they are hardcoded into the exe, if they are being removed id like to know how to make runes or powerups that behave like runes, thanks in advance.
Since the runes are hardcoded they can't be moved out of the core files for the time being.
Can we expect the ability to modify their properties in the future ? It'd be quite handy.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

Twister
Under Moderation
Posts: 49
Joined: Mon Jun 04, 2012 1:48 pm
Location: Next door
Contact:

RE: need help with runes

#6

Post by Twister » Thu Jun 07, 2012 7:48 pm

I would like to make a custom spread factor for a spread rune, as well as vertical spreading.
Smart Cheese Technology

User avatar
Popsoap
 
Posts: 86
Joined: Mon Jun 04, 2012 2:38 pm
Location: Inside a wall

RE: need help with runes

#7

Post by Popsoap » Thu Jun 07, 2012 8:47 pm

Should runes be removed, You can just make powerups with a long duration.

Code: Select all

Actor Example : PowerupGiver
{
  Powerup.Duration 0x7FFFFFFF /*This lasts about two years real time*/
}
EDIT: A duration of 0 works better, thanks to Twister for this info.
Last edited by Popsoap on Thu Jun 07, 2012 9:00 pm, edited 1 time in total.

Twister
Under Moderation
Posts: 49
Joined: Mon Jun 04, 2012 1:48 pm
Location: Next door
Contact:

RE: need help with runes

#8

Post by Twister » Thu Jun 07, 2012 8:54 pm

If I recall correctly,

Powerup.Duration 0 is infinite
Smart Cheese Technology

Qent
Retired Staff / Community Team Member
Posts: 1424
Joined: Tue May 29, 2012 7:56 pm
Contact:

RE: need help with runes

#9

Post by Qent » Fri Jun 08, 2012 3:03 am

You also need to drop all other runes when you pick up a new rune, and fail to pick up the same rune twice.
Twister wrote: If I recall correctly,

Powerup.Duration 0 is infinite
Not according to the wiki.
Last edited by Qent on Fri Jun 08, 2012 3:06 am, edited 1 time in total.

Bloax
Forum Regular
Posts: 411
Joined: Mon Jun 04, 2012 5:11 pm

RE: need help with runes

#10

Post by Bloax » Fri Jun 08, 2012 5:13 am

If the effects of the runes wouldn't be hardcoded, it'd be a godsend. (Especially the rage rune.)

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: need help with runes

#11

Post by Ijon Tichy » Fri Jun 08, 2012 5:24 am

Which reminds me... I don't think creating a variable rage powerup would be too terribly hard. Couldn't you do something like (once converted from obvious Python pseudocode):

Code: Select all

def rage(rageFactor, durations):
    overflow = 0
    
    for frame in durations:
        oldDur = frame + overflow
        newDur, overflow = divmod(oldDur, rageFactor)   # precision errors? bah.
        yield int(newDur)
with example output:

Code: Select all

>>> list(rage(2, [3]*15))
[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1]
This would handle odd-numbered tics, among other things, a lot nicer. Floating-point rage factors are supported with that rage function, by the way - just watch for precision errors (reset when getting to the Ready state, maybe?) if you wanna be careful.

Edit: Actually, I might try to do this myself. SOURCE CODE EDITING POWERS AWAAAAYYYYY
Edit2: I have no fucking clue where to look.
Last edited by Ijon Tichy on Fri Jun 08, 2012 5:43 am, edited 1 time in total.

Bloax
Forum Regular
Posts: 411
Joined: Mon Jun 04, 2012 5:11 pm

RE: need help with runes

#12

Post by Bloax » Fri Jun 08, 2012 6:11 am

Ijon Tichy wrote:Edit2: I have no fucking clue where to look.
The bane of casually messing with sources!

Catastrophe
Retired Staff / Community Team Member
Posts: 2558
Joined: Sat Jun 02, 2012 2:44 am

RE: need help with runes

#13

Post by Catastrophe » Fri Jun 08, 2012 2:05 pm

.
Last edited by Catastrophe on Fri May 11, 2018 7:10 pm, edited 3 times in total.

User avatar
mr fiat
Frequent Poster Miles card holder
Posts: 858
Joined: Tue Jun 05, 2012 3:28 pm
Location: netherlands

RE: need help with runes

#14

Post by mr fiat » Sat Jun 09, 2012 2:03 pm

Popsoap wrote: Should runes be removed, You can just make powerups with a long duration.

Code: Select all

Actor Example : PowerupGiver
{
  Powerup.Duration 0x7FFFFFFF /*This lasts about two years real time*/
}
EDIT: A duration of 0 works better, thanks to Twister for this info.
yes but the powerups can still stack this way which is something I don't want.

Klofkac
Forum Regular
Posts: 481
Joined: Sat Jun 09, 2012 1:31 pm
Location: Ask Grandvoid servers

RE: need help with runes

#15

Post by Klofkac » Sat Jun 09, 2012 2:15 pm

Maybe using A_JumpIfInventory("ThisRune",1,"fail") would work.
𝕂𝕝𝕠𝕗𝕜𝕒𝕔

Bloax
Forum Regular
Posts: 411
Joined: Mon Jun 04, 2012 5:11 pm

RE: need help with runes

#16

Post by Bloax » Sat Jun 09, 2012 3:31 pm

Runes should stay, they sure need a revamp; however.

As for rage runes, I wonder how

Code: Select all

oldDur = Frame; //Getting le Duration
newDur = round(oldDur / RageFactor + 0.51); //Dividing it by the ragefactor, with a round(1/x) = 0 fix.
finDur = newDur <= oldDur ? newDur : oldDur; //The fix turns 0 to 1, so if that happens, revert it. :-)
lolformatthief

Would do.

Edit: If you guys want to see how it'd perform, check this instacalc setup out.
Last edited by Bloax on Sat Jun 09, 2012 3:47 pm, edited 1 time in total.

Post Reply