WWHC-Diaz + (NEW!) The VR Missions (help wanted!)

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Post by Zippy »

DoomRater wrote:Zippy, you can test widescreen mode by using a windowed resolution.
Something I routinely forget many games are capable of. Need my full screen action. Anyway, I'm going to go out on a limb and assume I'm going to have to explicitly tell ZDoom the size, because it's not going to provide me with widescreen resolutions just because I'm in windowed mode? -width 1024 -height 576 should work nicely then... that should be 16:9.
Risen wrote:It blocks out a 4:3 rectangle in the middle and references that. In KDIZD, I used large black boxes to mask out the remaining areas. That was needed for the intermap and credits.
Hmm... clearly not going to work for an in game hud. Well... widescreen is still something secondary on my list, but I'm sure I can do something like checking the player's resolution to see its ratio and figure things out from there.
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

Don't know what you're seeing, but I get a whole bunch of choices in the video options menu...

And no, I wouldn't block out everything on the sides for the sake of a HUD. It was fine for cutscenes such as the intermap and credits in KDIZD, but I'd never do it during real gameplay. However, you could perhaps use small areas with some graphics to them without taking up the entire side of the screen.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Post by wildweasel »

Okay, issue with DoomRater's script.

I have imported the script verbatim:

Code: Select all

#library "DIAZ"
#include "zcommon.acs"

Script 357 (int movespeed)
{
SetActorProperty(0,APROP_Speed,movespeed/100);
}
And I am referencing that script in my Decorate lump like so:

Code: Select all

	AltFire2:
		MAUI E 2 A_TakeInventory("MauserIdle",30)
		MAUI F 2 A_GiveInventory("MauserIronSight",1)
		MAUI G 0 ACS_Execute(357,0,35,0,0)
		MAUI GHIJ 2
		MAUS A 2
		Goto IronReady
Which, if the wiki is correct, should be executing script 357 with an argument of 35 (which would drop the player speed to 35%, in theory). Yet, for some reason, this freezes the player completely, with no way to escape. What happened?
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Post by Matt »

Have you tried using 0.35 instead and getting rid of the /100?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

The joys of integer division. The reason the player freezes is because dividing 35/100 as an integer is 0. Try using 35.0 instead of 35, which will make the script interprit the argument as a fixed point number and as such should work properly
Gez
 
 
Posts: 17841
Joined: Fri Jul 06, 2007 3:22 pm

Post by Gez »

Also, division by 100.0 should now work. Furthermore, you can multiply by 0.001 instead.
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

Or you can be an ultra smartarse and multiply by the not-quite-precise value of 655. :P
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ

Post by DoomRater »

Dangit, I figured there'd be something wrong with it since I didn't try it myself... but oh well, everyone jumped on right quick to help fix it.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Post by wildweasel »

The freezing issue is still here - my current script:

Code: Select all

#library "DIAZ"
#include "zcommon.acs"

Script 357 (int movespeed)
{
SetActorProperty(0,APROP_Speed,movespeed);
} 
And here's how I'm calling the scripts in my weapon (posting the entire weapon code this time in case I missed something):
Spoiler:
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Post by wildweasel »

Five hours later and more tinkering, I've still not managed to fix the issue. I'm pretty much back where I started. Any help?
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Post by Zippy »

Risen wrote:Don't know what you're seeing, but I get a whole bunch of choices in the video options menu...
ZDoom only ever supplies me with the resolutions my monitor actually supports, which is of course very desirable behavior. Getting resolutions your monitor can't support just doesn't seem like the logical thing to do. Even it windowed mode it reports the same, so in order to use a resolution unsupported by the monitor I need to tell it explicitly what I want.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ

Post by DoomRater »

Okay, multiplied by 65535 and divided by 100 and then the values acted like they should. (100 is normal, 35 is the shouldered value you had) But then I moved around one of the two scripts and I'm not sure where I fumbled it up so now after I shoot the Mauser I'm running fast, heh.
Edit: putting this in code tags this time so it's more visible:

Final script:

Code: Select all

Script 357 (int movespeed)
{
  SetActorProperty(0,APROP_Speed,movespeed*65535/100);
}
like that!
Last edited by DoomRater on Fri Sep 28, 2007 2:41 pm, edited 1 time in total.
Gez
 
 
Posts: 17841
Joined: Fri Jul 06, 2007 3:22 pm

Post by Gez »

wildweasel wrote:The freezing issue is still here - my current script:

Code: Select all

#library "DIAZ"
#include "zcommon.acs"

Script 357 (int movespeed)
{
SetActorProperty(0,APROP_Speed,movespeed);
} 
(int movespeed) -- you don't need to go farther.

If movespeed's an int, it's going to be 0 when it's less than 1...
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Post by wildweasel »

Um, okay...so I need movespeed to not be an int? What other options are there that would work?
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ

Post by DoomRater »

Making it an int and multiplying it by 65536 so that it is correctly offsetted like the fixed point is.

'fixed point' is not really fixed point per se, it is actually an int that is divided by 65536 and then displayed with a decimal point. The script entry I posted above I tested this time so it should work- input 100 for normal speed and 35 for the shouldered speed.

Return to “Gameplay Mods”