CON coders/mappers help needed
#1 Posted 29 August 2014 - 01:42 AM
For my EDuke32 addon pack compilation, I am looking for some folks who know their stuff with CON coding and possibly some map editing who could take a look at remaining issues I am encountering in some of the addons I want to include with the release.
Mainly, it's about the infamous "sprite resize bug", but in a few cases also regarding stuff I am unable to solve with specific maps. You would need the CON/map files and probably also the groupfiles themselves which I can provide you on demand for investigation. A more detailled list about what kind of fixes I would need can be found here ("Remaining issues").
Thanks a lot in advance!
#2 Posted 29 August 2014 - 11:39 PM
eventloadactor *actror name or tile number here* setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda
You'd have to create varients of that for different versions of the actors like stayput ones as well, but that'll make the sprite size down on mapload instead of when it sees the player.
#3 Posted 30 August 2014 - 10:37 AM
#4 Posted 30 August 2014 - 04:12 PM
And: Where to put the code in general? Game.con, user.con... or does it even matter? It's relevant where I put the code in the con, beginning, end, anywhere?
This post has been edited by NightFright: 30 August 2014 - 04:14 PM
#5 Posted 30 August 2014 - 06:53 PM
include patches.con
to the bottom of GAME.CON, and including a patches.con with anything that doesn't require modification of something already in the existing CONs.
#6 Posted 31 August 2014 - 06:40 AM
Currently, I only put lines into patches.con like for "The Gate":
// Heavy Tank EVENT_LOADACTOR 1870 setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda // Predator EVENT_LOADACTOR 4806 setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda EVENT_LOADACTOR 4812 setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda EVENT_LOADACTOR 4818 setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda EVENT_LOADACTOR 4819 setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda EVENT_LOADACTOR 4839 setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda // Flying Brain EVENT_LOADACTOR 5321 setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda EVENT_LOADACTOR 5326 setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda EVENT_LOADACTOR 5331 setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda
(I know I have to replace the *xsize and *ysize parts with values still, but I haven't found them yet.)
EDuke32 then gives an error like
patches.con:6: error: expected a keyword but found `EVENT_LOADACTOR'
I have to put something else in there as well?
This post has been edited by NightFright: 31 August 2014 - 06:42 AM
#7 Posted 31 August 2014 - 07:19 AM
Hendricks266, on 30 August 2014 - 06:53 PM, said:
include patches.con
to the bottom of GAME.CON, and including a patches.con with anything that doesn't require modification of something already in the existing CONs.
NightFright, on 31 August 2014 - 06:40 AM, said:
patches.con:6: error: expected a keyword but found `EVENT_LOADACTOR'
I have to put something else in there as well?
onevent EVENT_LOADACTOR { setactor[THISACTOR].xrepeat *xsize setactor[THISACTOR].yrepeat *ysize enda [...] }
Maybe you can figure it out by looking into DUKEPLUS.CON
#8 Posted 31 August 2014 - 12:25 PM
In BDP.CON, I found info about the tilenums:
define PREDATOR 4818 define PREDSTAYPUT 4819
So I guess a fix for 4818 and 4819 is needed.
That's actually almost as far as I get. It's hard to find the size of the thing. The whole Predator code in BDP.CON is this:
Only conclusive sizeat I can see is 42 36, so maybe it's that.
But how to define the two entries for this EVENT_LOADACTOR stuff, then?
This post has been edited by NightFright: 31 August 2014 - 12:25 PM
#9 Posted 31 August 2014 - 12:50 PM
onevent EVENT_LOADACTOR switch sprite[THISACTOR].picnum case PREDATOR case PREDATORSTAYPUT setactor[THISACTOR].xrepeat 42 setactor[THISACTOR].yrepeat 36 break endswitch endevent
Untested but that should work (not sure if you can access the variable directly like that with a switch, if not try this:
gamevar picnum 0 2 onevent EVENT_LOADACTOR getactor[THISACTOR].picnum picnum switch picnum case PREDATOR case PREDATORSTAYPUT setactor[THISACTOR].xrepeat 42 setactor[THISACTOR].yrepeat 36 break endswitch endevent
Place that after the con file includes the mod's Def file (or after the 'include' commands which are usually at the top of the file) If there are no defines for a tile/monster, just use it's tile number instead.
This post has been edited by Jblade: 31 August 2014 - 12:51 PM
#10 Posted 31 August 2014 - 01:30 PM
This post has been edited by NightFright: 31 August 2014 - 01:30 PM
#12 Posted 01 September 2014 - 01:15 AM
Something like:
onevent EVENT_LOADACTOR switch sprite[THISACTOR].picnum case ACTOR1 case ACTOR2 setactor[THISACTOR].xrepeat 40 setactor[THISACTOR].yrepeat 40 break case ACTOR3 case ACTOR4 case ACTOR5 setactor[THISACTOR].xrepeat 30 setactor[THISACTOR].yrepeat 30 break endswitch endevent
This would kinda group entries that all have the same sizeat values (even if it's about completely different sprites) - does this work?
When looking at "Grins of Divinity", the code above seems to have little effect. All actors just have numbers in GOD1.con - I don't think that's a problem, but the thing is they added highres sprites which are apparently sized down later. It was already like that from the beginning, so I'm not sure if this method also works there.
#13 Posted 01 September 2014 - 01:18 AM
#14 Posted 01 September 2014 - 05:23 AM
Here is what the current patch files look like:
The Gate
Grins of Divinity
Infestation in Time
Duke, It's ZeroHour
If there is any way to improve the code further, don't hesitate to point it out. Currently, I am adding the patches.con files at the end of any game.con.
#15 Posted 01 September 2014 - 12:11 PM
NightFright, on 01 September 2014 - 05:23 AM, said:
LeoD, on 31 August 2014 - 07:19 AM, said:
NightFright, on 01 September 2014 - 05:23 AM, said:
setgamename Infestation in Time
near the beginning to set the Window title bar.
#16 Posted 01 September 2014 - 01:36 PM
*EDIT September 1, 2014*
Seems to work. For "The Gate", I had to switch from actor names to tilenums in patches.con since Predator names aren't defined before bdp.con is loaded, which has to follow after game.con. Apparently this change doesn't make any difference, so fine by me.
*EDIT September 7, 2014*
Two more problems which require your assistance:
- "Nuclear Showdown" uses custom fullscreen HUDs, but they are not optimized for widescreen and leave gaps to the left and right. Is there a way to fix this in the CON files (I guess downloading and checking M210's CON patch would be enough) - and if so, how?
- Can it be done to reset player inventory to default (pistol start) only for specific levels via CON code (without altering the maps themselves)?
This post has been edited by NightFright: 07 September 2014 - 06:32 AM
#17 Posted 14 September 2015 - 11:48 AM
Using thegate.grp from my addon compilation release that used to work by the time of its release (Dec 2014), the addon now produces "fake" Predators which are scattered throughout the maps which look like statues and simply do nothing. They also cannot be shot. I have experimented with different setups:
- Addon compilation version --> behavior as above
- Original addon (unchanged archive download) --> works as intended
- Addon compilation version with "patches.con" (includes resize fix) removed --> works as intended
Contents of patches.con:
// Sprite resize bugfix for Predator (4818 PREDATOR/4819 PREDSTAYPUT) onevent EVENT_SPAWN switch sprite[THISACTOR].picnum case 4818 case 4819 setactor[THISACTOR].xrepeat 42 setactor[THISACTOR].yrepeat 36 break endswitch endevent
EDuke32 version: r5344 x64
Has anything changed about the functionality of this feature since December 2014 or did something possibly break in the meantime?
For testing purposes, download the isolated addon compilation version of "The Gate" here (14.1 MB zipped).
Usage:
- Extract "gatetest" dir into EDuke32 dir
- Launch EDuke32 with -jgatetest dir
- Select "The Gate" from launcher
*EDIT Sep 25, 2015*
Apparently it also doesn't work properly with snapshots from 2014 or earlier. I have no clue what's going on here, I am sure it used to work at some point. Code is still doing what it is supposed to do, but those dummy sprites which are spawned at the same spots all the time are really annoying.
This post has been edited by NightFright: 25 September 2015 - 02:34 AM
#18 Posted 05 October 2015 - 09:40 AM
Is there any way to add in the basic GRP file of the game, the enemy "Predator" of add-on "The Gate" ? I try to find help to create different maps with the content add-ons, but no answer.
Francis
#19 Posted 05 October 2015 - 10:50 AM
I guess it is possible if you copy the artfile that contains the tiles plus the code. I dunno how much work that is, but I am sure if you put that request in a separate thread, someone will be able to assist you with it. To be honest, this exceeds my knowledge.
#20 Posted 05 October 2015 - 11:07 AM
#21 Posted 10 August 2016 - 12:56 AM
In Zaxtor's "Oblivion", there is a replacement weapon for the shrinker called the "Muddlelizer". According to the website, it's supposed to do this:
This isn't a shrinker... The Muddlelizer is quite an interesting rare weapon. It does minor harm to enemies but kills weak enemies with 1 shot. What the gun does is to cause the enemy to become disoriented/confused. For a short while if you shoot an enemy while he is disoriented, it will hurt him, but if his health is at zero when the disorientation wears off, the enemy will die. This gun can also make you immortal to certain things for several seconds until you hear a noise if the photon hits you. Pressing the button again will switch to the Expander gun.
The problem is that at least with recent EDuke32 snapshots, the Shrinker isn't making you invincible when you hit yourself with it. Instead you stay shrunk and you can't grow back to full size any more. Quite an annoying issue, and I wonder if it can be fixed via con code or it's something that broke at some point within EDuke32. Check out the con file below for analysis. Thanks in advance!
P.S.: Also check out this comparison between my modified oblivion.con and the original game.con. Apparently there seems to be a glitch there since it works with the original con file.
This post has been edited by NightFright: 10 August 2016 - 06:56 AM
#22 Posted 19 September 2016 - 06:58 AM
I am trying to add additional static and dynamic music tracks to "Starship Troopers TC". This is done because I want to add some custom levels which replace existing music tracks. I don't want the new tracks to override the new ones (would affect other levels), so additional coding is needed since this TC works differently when it comes to music. A sprite (tile #487) is added to the level, and depending on its pal number, different static (nothing happens) or dynamic (enemies appear) music is used.
While I was able to add the new tracks and they are also played ingame, an issue occurs when changing levels - the track played in the previous level plays again, simultaneously with the new one.
The sounds I have added are these:
definesound 400 bts_mus.wav 0 0 255 1 -30000 definesound 401 eots_01.wav 0 0 255 0 0 definesound 402 eots_02.wav 0 0 255 0 0 definesound 403 eots_03.wav 0 0 255 0 0 definesound 404 eots_04.wav 0 0 255 0 0 definesound 405 eots_05.wav 0 0 255 0 0 definesound 406 eots_06.wav 0 0 255 0 0 definesound 407 eots_dyn.wav 0 0 254 1 -15000 definesound 408 eots_mus.wav 0 0 255 1 -30000 definesound 409 its_rein.wav 0 0 255 16 0 definesound 410 its_mus.wav 0 0 255 1 -30000
I have added definitions for spritepal 60-62 for actor 487 to realize the changes (ofc that meant that I had to edit the levels to change the palette of the music sprite).
Please check attached ssttc.con for details.
This post has been edited by NightFright: 19 September 2016 - 06:59 AM