Duke4.net Forums: Those simple questions thread - Duke4.net Forums

Jump to content

  • 18 Pages +
  • « First
  • 6
  • 7
  • 8
  • 9
  • 10
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Those simple questions thread  "Simple questions, simple answers"

User is offline   Mark 

#211

View PostHendricks266, on 19 July 2014 - 11:32 AM, said:

'floorz' is a member of the sector structure. You use it with the getsector command.

getsector[<sector id>].floorz temp

In actor code, THISACTOR is a magic token for sectors that identifies the actor's current sector.

getsector[THISACTOR].floorz temp

Is sector id the same thing as the sector number shown in Mapster or something different?

And in my case, the actor's sector or coordinates are not relevant. I was only looking for a way to tie an enemy's " killit " command to a floor door lowering. My hopes were an easy one or two lines of code to monitor for when the floorz of sector 742= 3072 then the killit command. Instead I ended up accomplishing my goal through the use of a touchplate and masterswitch to lower the door and kill the enemy with a C9 cannister also triggered by the masterswitch.

This post has been edited by Mark.: 20 July 2014 - 02:14 PM

0

User is offline   Chip 

#212

Quote

Is sector id the same thing as the sector number shown in Mapster


That's correct.


I've decided to have a little play with Mapster32 scripting, or more accurately, tweaking a few things.
Basically I want to do the following,
1. Set the colour of the 2D mode tags for my custom sprites to match the official ones. (So white for new Sector Effector members, Orange for Enemies etc.. )
2. Place my custom sprites into the special tile listings.

I've taken a look through the Eduke32 wiki but not finding it particularly useful and having difficulty finding relevant pages for my 2 specific tasks. For example, I had to use the search feature to find the Mapster32 scripting section, as there doesn't seem to be any links to it on the main page. In addition to that, it says that scripting is done in 2 ways, both of which require manual input though the console. Does this mean Mapster32 can't auto-load files? If it can, what are the extensions it supports or was the lone mention of .M32 (said for use with the "include" command within the console) the only file extension supported?

But while also typing things in the search engine, I did find a command that looks like it could solve my first issue: "spritecol" but where do I use this? I tried creating an external .M32 file and loading it manually through the console, but it just gave me an error.
I also came across a page about the special tile listings, but it didn't say how to change it.

This post has been edited by Chip: 31 July 2014 - 06:25 AM

0

User is offline   Kyanos 

#213

Read samples/a.m32
0

User is offline   Chip 

#214

That's a good start, thanks, but I still don't seem to be any closer with my original tasks.
I can now make Mapster32 automatically load scripts (it's done through a specifically named .CFG file) but I still don't know how to make that spritecol command work - it still returns an error saying it's an invalid command / gamevar. Considering how old that page on the wiki is, would I be right in thinking that perhaps this command no longer exists in modern Mapster32 builds?
0

User is offline   Chip 

#215

I also have another question: Is there any way to detect whether an ACTIVATOR / ACTIVATORLOCKED / MASTERSWITCH have been activated?

This post has been edited by Chip: 04 August 2014 - 09:13 AM

0

User is online   Danukem 

  • Duke Plus Developer

#216

View PostChip, on 04 August 2014 - 09:13 AM, said:

I also have another question: Is there any way to detect whether an ACTIVATOR / ACTIVATORLOCKED / MASTERSWITCH have been activated?


There is this: http://wiki.eduke32....activatormotion

I have used it with some success, but it has limitations and quirks (don't recall what they are right now). Experiment.
0

User is offline   Chip 

#217

Thanks!
I knew I've seen this command before, but I was looking through structure members - thinking it would be something tied to a statnum or htflag.

I was going to use this command to try and stop an actor opening a door with an un-activated MASTERSWITCH, since they can really screw up some maps when an actor "accidentally" opens one when is not meant to be unlocked till later.

*edit*

I've just played around with it and the only issue I had with it is actually to do with the way ACTIVATORLOCKED works and not to do with the command. ACTIVATORLOCKED never ever triggers, so it always returns 0 to the command. Instead it actually changes the lotag of the sector (the sector in question had a lotag of 20) to 16404 when locked, and changed it back to 20 when unlocked. I would imagine the same principle applies to other forms of opening doors but with a different lotag when locked. 16405 for door 21? 16406 for door 22? 16407 for door 23? Don't know - don't care - my code specifically checks for the lotag of the door first then any activators later, As such, I don't actually need it to check for ACTIVATORLOCKED at all!

Once again, thanks for your help - no more will my actors open something that by rights should be locked, and can see a door as a passable route when not locked.

This post has been edited by Chip: 04 August 2014 - 11:25 AM

0

User is offline   Mark 

#218

I would like my custom enemies to change their strength according to the game's difficulty settings just like the regular ones do. Is this done through mapping or con coding. If cons, I'll continue this in a previous con code thread.

This post has been edited by Mark.: 03 September 2014 - 03:33 PM

0

User is offline   Jblade 

#219

It's done through code. Here's a quick and ugly way to do it:
ifvare userdef[THISACTOR].player_skill 1 strength 50
else ifvare userdef[THISACTOR].player_skill 2 strength 75
else ifvare userdef[THISACTOR].player_skill 3 strength 100
else ifvare userdef[THISACTOR].player_skill 4 strength 125

Stick that in the the startup code you have for the enemy. If you get errors about userdef than do this instead:
getuserdef[THISACTOR].player_skill tempvar
ifvare tempvar 1 strength 50
else ifvare tempvar 2 strength 75
else ifvare tempvar 3 strength 100
else ifvare tempvar 4 strength 125


edit: just woke up so I got the numbers wrong

This post has been edited by Jblade: 04 September 2014 - 12:41 AM

1

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#220

Skill zero equals no monster, no?
0

User is offline   Helixhorned 

  • EDuke32 Developer

#221

View PostChip, on 31 July 2014 - 06:24 AM, said:

I've decided to have a little play with Mapster32 scripting, or more accurately, tweaking a few things.
Basically I want to do the following,
1. Set the colour of the 2D mode tags for my custom sprites to match the official ones. (So white for new Sector Effector members, Orange for Enemies etc.. )
2. Place my custom sprites into the special tile listings.


Quote

For example, I had to use the search feature to find the Mapster32 scripting section, as there doesn't seem to be any links to it on the main page.

The few pages of M32Script documentation I did back then are linked are linked from the top navigation block in the Level editing page, among others. They are a bit sparse since I basically only wrote down the calling conventions for the commands but left it to the user to guess (by analogy with CON) their meaning.

Quote

In addition to that, it says that scripting is done in 2 ways, both of which require manual input though the console. Does this mean Mapster32 can't auto-load files? If it can, what are the extensions it supports or was the lone mention of .M32 (said for use with the "include" command within the console) the only file extension supported?

M32Script code can be entered (=begin to be executed) by either
- entering snippets in the console with the "do" OSD command, or
- from an event, which is a certain point in Mapster32 execution.
Loading an .m32 file means to compile definitions of events and "states" (subroutines) into bytecode which can then be executed on the proper occasion. Events additionally feature a disable mechanism to prevent erroneous executions from spamming everything. An invocation of the "include" OSD command can be placed in an m32_autoexec.cfg file to be executed on startup.

Quote

But while also typing things in the search engine, I did find a command that looks like it could solve my first issue: "spritecol" but where do I use this? I tried creating an external .M32 file and loading it manually through the console, but it just gave me an error.

Spritecol is a DEF language token that only takes effect in the editor.

Quote

I also came across a page about the special tile listings, but it didn't say how to change it.

Special tile listings are stored in yet another kind of file, tiles.cfg. Note that it's an entirely different kind of "cfg" than the autoexec one above. Fortunately, you don't need to edit that file manually. There's a convenience feature in the tile selector mode using (Ctrl+)SPACE to select some tiles and Ctrl-G to create a new group from them. See the entry for "T" in the keyboard listing.


When starting out, the various kinds of scripting/definition/configuration files can indeed be intimidating. Roughly, they can be classified as follows:

- Files that are merely sequence of OSD commands. Examples are the generated settings.cfg and the user-provided *autoexec.cfg.
- Windows INI-like configuration files. For instance, eduke32.cfg.
- Resource definition files. Mainly DEF, but the underlying framework is used a couple of other places such as for parsing tiles.cfg.
- Proper scripting. CON, M32Script (derived from CON) and Lua fall into this category. However, besides allowing "real" code these languages also feature what I call directives -- keywords that have an effect at compilation time, some of them rather similar to resource definition commands.
0

User is offline   Kyanos 

#222

I got a problem with transporterstar showing some extra frames of wrong tiles when I use a tiles014 & 15 .art file. Does anyone know what I need to do to fix this?

I think I need to leave a tile or two empty but I'm not sure which ones.

nevermind. it is tile 4095

This post has been edited by Drek: 08 September 2014 - 02:17 PM

0

User is offline   kullenberg 

#223

Hi, first post here!
Would it be possible to have a higher number of frames for a custom enemy sprite's animation? If so, would it be complicated?
6 or 8 frames instead of the usual 4 per walk cycle, for instance.
0

User is online   Danukem 

  • Duke Plus Developer

#224

View Postkullenberg, on 07 January 2016 - 04:15 PM, said:

Hi, first post here!
Would it be possible to have a higher number of frames for a custom enemy sprite's animation? If so, would it be complicated?
6 or 8 frames instead of the usual 4 per walk cycle, for instance.


Animations can be any number of frames, but obviously you need to have the art for them, and yes it is difficult to create.
0

User is offline   kullenberg 

#225

I should have been more clear, not referring to creating the art itself but rather the technical aspect. Can I add another frame to a existing sprite in dukeres or would it require scripting aswell?
0

User is online   Danukem 

  • Duke Plus Developer

#226

View Postkullenberg, on 08 January 2016 - 03:22 AM, said:

I should have been more clear, not referring to creating the art itself but rather the technical aspect. Can I add another frame to a existing sprite in dukeres or would it require scripting aswell?


It requires that you change the corresponding animation definition in the script. For a walking cycle, this should be as simple as changing a single number. If it were a death or shooting animation, it might require changing a few other numbers in the actor script, since some actors refer to specific action counts to make state transitions.
0

User is offline   Perro Seco 

#227

I really like Eduke32, but the new horizontal transition between menus is a little annoying for me. Can I deactivate it in any way?
0

User is offline   LeoD 

  • Duke4.net topic/3513

#228

View PostPerro Seco, on 17 January 2016 - 03:56 PM, said:

I really like Eduke32, but the new horizontal transition between menus is a little annoying for me. Can I deactivate it in any way?
Adding this code snippet at the end of your GAME.CON should help:
// Disable menu transition animations (code by Hendricks266)
// EDuke32 r4945 or later required

onevent EVENT_DISPLAYMENU
    setuserdef .m_origin_x 0
    setuserdef .m_origin_y 0
endevent

onevent EVENT_DISPLAYINACTIVEMENU
    setuserdef .m_origin_x 0
    setuserdef .m_origin_y 26214400 // 400<<16
endevent

4

User is offline   Inspector Lagomorf 

  • Glory To Motherland!

#229

What are optimal settings for running eDuke32 with an SSD?
0

User is offline   Hendricks266 

  • Weaponized Autism

  #230

QSIZE 1024, Come Get Some.
1

User is offline   kullenberg 

#231

I can't get these actions to work:
"set palette of all sprites/walls/floors/ceilings
(respectively) in all selected sectors" (command 'P)

and

"set palette of all sprites/walls/floors/ceilings
in all selected sectors" (command ;P)

Mapster only responds to the letter P being pressed. I have a scandinavian keyboard if that makes any difference. Same results if running in both my native swedish mode and english mode. What am I doing wrong?
0

User is offline   kullenberg 

#232

One more thing - is there any techniques/tricks one can use to make the ambient sounds have a smoother fade out? I'm really bothered by how choppy and unorganic the ambient sounds are playing. Maybe it's just a limitation of the engine?
0

User is offline   kullenberg 

#233

Okay okay, another one! Why does dukeres flip some of my imported art and how can I fix it? I know I can flip sprites in mapster obviously but I'd like to adress the underlying issue.
0

User is offline   Mike Norvak 

  • Music Producer

#234

Hi, is there a simple way to disable the change of sector visibility when a weapon is fired?
0

User is offline   Mblackwell 

  • Evil Overlord

#235

So you'll want these weapon settings:
http://wiki.eduke32....efined_gamevars
http://wiki.eduke32....i/WEAPONx_FLAGS

Take the default parameter and add 256.
0

User is online   Danukem 

  • Duke Plus Developer

#236

Here's a very safe way to do it which will work in any mod, if you are worried about messing up the weapon flags. This is a concern because in some mods, weapon flags change dynamically when a weapon switches from one firing mode to another (.e.g. regular versus altfire in WGR2).

Find where the player actor code starts. This will be the line "actor APLAYER MAXPLAYERHEALTH PSTAND 0 0". Below that, add the following:

orvar WEAPON1_FLAGS 256
orvar WEAPON2_FLAGS 256
orvar WEAPON3_FLAGS 256
orvar WEAPON4_FLAGS 256
orvar WEAPON6_FLAGS 256
orvar WEAPON7_FLAGS 256
orvar WEAPON9_FLAGS 256
orvar WEAPON11_FLAGS 256


Note that I skipped the mighty boot, pipebomb, and laser tripbomb, since none of those flash the level anyway.
0

User is offline   Jblade 

#237

View Postkullenberg, on 10 February 2016 - 07:44 AM, said:

Okay okay, another one! Why does dukeres flip some of my imported art and how can I fix it? I know I can flip sprites in mapster obviously but I'd like to adress the underlying issue.

The easiest way to do this is to copy the art in whatever image editing program you're doing into the clipboard and just paste it into the art slot you want in Dukeres :dukeaffirmative:
0

User is offline   kullenberg 

#238

View PostJblade, on 10 February 2016 - 11:45 PM, said:

The easiest way to do this is to copy the art in whatever image editing program you're doing into the clipboard and just paste it into the art slot you want in Dukeres :dukeaffirmative:


Same result, unfortunately.
0

User is offline   Kyanos 

#239

I switched over to Build ART Files Editor (BAFed) by M210
it's near the top on this page http://www.dukertcm....-eduke32-tools/

I like it better than Dukeres.

Still use dosbox and bmp2art / art2bmp mostly though.
0

User is offline   kullenberg 

#240

View PostDrek, on 11 February 2016 - 05:09 AM, said:

I switched over to Build ART Files Editor (BAFed) by M210
it's near the top on this page http://www.dukertcm....-eduke32-tools/

I like it better than Dukeres.

Still use dosbox and bmp2art / art2bmp mostly though.


Thanks, I'll look into it.
0

Share this topic:


  • 18 Pages +
  • « First
  • 6
  • 7
  • 8
  • 9
  • 10
  • Last »
  • 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