What's The Error Message?
#15815 posted by czg on 2016/01/19 22:24:28
Error Message
#15816 posted by mjb on 2016/01/19 22:55:48
Ah I suppose that would help!
CALL0 986(?)
AI.QC : FindNewEnemy
AI.QC : AI_Run
Shambler.QC : SHAM_RUN1
(NO FUNCTION)
NULL_FUNCTION
HOST_ERROR: PROGRAM ERROR
That's the text I get when trying to load the map. For further details I am using an info_null and changing its classname to sham_magic11.
#15817 posted by necros on 2016/01/19 23:28:46
your info_null is running AI functions which look for th_run (which isn't set) hence the 'NULL_FUNCTION' error.
Check your stuff over...
NULL_FUNCTION
#15818 posted by mjb on 2016/01/19 23:38:41
That does seem to be the issue but as far as checking stuff over I merely followed the Preach maphack article regarding NM skill detection.
It states that you should get a crash and the fix is to include the ai_stand key with SUB_Remove value in order to "appease" the game since a function is running.
The article does say to use an info_notnull while I am using an info_null but that's the only one I see of the type. Since I am changing the classname is that a moot point?
Thanks for the replies!
#15819 posted by necros on 2016/01/19 23:50:11
i don't know this hack, but 'ai_stand' as a key makes no sense. maybe he meant 'th_stand'?
THat's It!
#15820 posted by mjb on 2016/01/20 00:10:15
Okay so having the "ai" instead of "th" was certainly the issue. The article states ai_stand so naturally that's what I entered! The map loads!
Thank you Necros!
Spoke Too Soon
#15821 posted by mjb on 2016/01/20 03:04:27
Okay,
So the th_stand key did work as the map loads. Now the issue is I do not believe the sham_magic11 (The unique cast of lightning only on skill level 3) is firing. Here is what I have:
info_null
classname: sham_magic11
th_stand: SUB_Remove
trigger_once
health: 1
target: ammo
shotgun shells with targetname: ammo
I have the sham_magic11 entity aimed to shoot towards the origin (0,0,0?) with the trigger_once in between.
The trigger works if I touch it/shoot it but the lightning does not appear to shoot off. I do check that skill is set to 3 before trying as well ;)
This is what I am using as reference: https://tomeofpreach.wordpress.com/2014/10/07/nightmare-skill-detection/
I want to figure this out!
Spoke Too Soon - The Reckoning
#15822 posted by mjb on 2016/01/20 03:15:30
Must have misjudged the origin point and my trigger.
I encased the origin point with trigger_onces' instead of my strong estimated single trigger and BAM things happen!
Apologize for the redundant post but hopefully it may assist someone else that hits a snag with this brilliant map hack.
I am really glad a community still exists for this game and such a great resource exist.
Thanks
#15823 posted by necros on 2016/01/20 03:19:10
From preach's article:
1) Make sure the shootable trigger is earlier in the entity list than this lightning entity, or the lightning will shoot at something that�s not there. 2) ensure either that both shootable target and lightning are later in the entity list than everything you�d like to remove (or put a short delay on the shootable target); otherwise you�ll try to remove entities before they are spawned.
most likely the entity order is wrong.
the thing is, when you set a classname, when quake loads the map, it begins spawning entities in the order they are declared in the map file.
when an entity is spawn, quake checks all the functions defined in progs.dat and if it finds one which matches the name of the classname, it immediately runs that function. (if it doesn't find the name, then it just removes the entity).
this means that the lightning is being fired while the level is load so if the trigger is declared at a later point than the lightning, then it doesn't exist yet when the beam goes through.
you can try this:
classname: info_notnull (this is important, info_null entities are removed by light.exe because they are only meant for spotlight targets and become meaningless afterward)
th_stand: SUB_Remove
nextthink: 3
think: sham_magic11
no guarantee if that'll work or not, but this will make it fire 3 seconds after the level loads. i think this number could be 2, but i put 3 to guarantee it works.
between 0 and 1 seconds, entities are being loaded into the map, ammo boxes are being dropped to the ground, etc etc...
Crosspost
#15824 posted by necros on 2016/01/20 03:19:57
i think more likely when you moved the trigger, it re-ordered the entities when the editor updated the map file. :P
I Think You Are Right
#15825 posted by mjb on 2016/01/20 12:24:30
Thanks for the additional information Necros.
Yeah I was trying to make sure the trigger_once was before in the entity order by editing the .map file in a text editor before compiling. (Is that how you do it?)
The fact that info_null might be dead before the level loads is another great possibility. I will try the entity you defined today and see if it works!
For some reason I swear my test worked one time which is why I posted such but now it refuses to work...entity order and timing are probably the factors.
I will certainly not give up on this!
#15826 posted by necros on 2016/01/20 20:56:13
It depends on your editor. In sikkpin 's editor I could just cut and paste and it would place that entity at the start of the list.
No t sure about TB or jack/hammer
A Good Nightmare!
#15827 posted by mjb on 2016/01/20 22:09:25
Tried your not_null entity with the think keys and it works like a dream (Or should I say nightmare!)
I was able to spawn in an extra enemy and remove ammo ONLY if the skill level was 3. The only caveat is the number of kills on Hard mode will always be greater than the available monsters. But since this is also a pretty crazy hack to begin with, I will not complain!
I tested think at 1 and it acted without delay. I understand if I have any issues I will just up the number to 2 or higher.
Either way I am ecstatic that this is working and is consistently working! Thank you Necros for your help I greatly appreciate it. I do try to search this thread for help before posting but this one I would have never figured out on my own.
Oh I use TrenchBroom as my editor. I was editing the .map file with a text editor and then compiling to change entity orders. But with this think key I can bypass all that.
Cheers
Fixed Post
#15828 posted by Preach on 2016/01/20 22:32:19
Thanks to necros for sorting this out while I was away, I've corrected th_stand in the blog post down.
Bonus idea: if you're worried about kills in nightmare, why not try killing off the monsters instead of using killtarget on them? The easiest way to do that would be to telefrag them, have some teleport triggers around them which you fire in hard to make the monsters smoosh together and die. In nightmare, you killtarget the teleport trigger so teledeath doesn't occur. You could even use the gibs for bonus decoration in hard...
Great Idea Preach
#15829 posted by mjb on 2016/01/20 23:25:58
Thank you for the great blog posts, they are very useful!
Well the way I am doing it is having a monster with targetname "nm" with a delayed spawn.
The trigger_once that the sham_magic11 hits targets "nm"
I should have mentioned I am using Quoth haha. The telefrag plan is a good idea but I think if I actually have the full map pack finished I'll worry about the kill count. ;)
Much appreciated.
Preach
#15830 posted by necros on 2016/01/21 02:19:30
maybe add a quick blurb about using think + nextthink. while it's not as clean as doing it via classname, it is simpler as entity order is no longer important.
#15831 posted by adib on 2016/01/21 05:13:38
Gonna pester Xaerox at JH thread about entity order.
Think Works Great
#15832 posted by mjb on 2016/01/21 12:28:44
I have fully implemented NM spawns/despawns in my map and it works fantastic. The only requirement is to not have any NM related "stuff" happen in the player's line of sight at the start of the level(Unless you want them to see their hopes in dreams vanish or appear in front of their eyes!). Looks like with a map with a lot of entities, nextthink 2 is ideal.
Total Beginner Needs A Bit Of Help With First Ever Map
#15833 posted by sputnik on 2016/01/23 20:54:37
I'm using TrenchBroom to make my first ever map. Testing it with DarkPlaces. All going well initially but now the map is starting to flicker, making parts of walls and floors momentarily transparent.
I've tried using the Point File to find leaks but can't figure out where they are or how to fix them.
This is all beginners' stuff, I'm sure. But we all have to start somewhere :)
Any advice gratefully received. Thanks.
It's A DP Bug...
#15834 posted by ericw on 2016/01/23 20:56:50
set "r_useportalculling 0". I should report it properly..
Thanks Ericw
#15835 posted by sputnik on 2016/01/23 21:04:59
Thanks for the quick answer. I tried that but still have the flickering. I think it's down to problems with the map as it only started after I built a new area.
Compiling the map gives me dozens of warnings but I'm not sure how to address them. As a total beginner, I've read a lot of guides but to no avail.
#15836 posted by JneeraZ on 2016/01/23 21:07:11
Use a more standardized engine like Quakespasm or Fitzquake. Using Darkplaces adds a bunch of variables into the mix that you don't need to be concerned about right now.
IMO
I think testing in a wide variety of engines is a good idea, the quake community is pretty fragmented.
Various Engines Now Tested
#15838 posted by sputnik on 2016/01/23 21:28:21
Thanks. I've now installed and tested my map with Quakespasm and Fitzquake. Both were flicker-free. So it was indeed a Darkplaces issue.
Annoying though as Darkplaces with hi-res textures made even my unfinished effort look nice!
#15839 posted by JneeraZ on 2016/01/23 21:38:16
"Annoying though as Darkplaces with hi-res textures made even my unfinished effort look nice! "
*glare*
|