Z008MJ@Posted: Mon Sep 20, 2010 1:43 pm :
Now, as far as i know, i should just have to change the classname inside the map file, so if i change "weapon_shotgun" to "weapon_nailgun", then a Nailgun will spawn instead of a Shotgun. Yet this does not work, what am i supposed to do?



Tetzlaff@Posted: Thu Sep 23, 2010 7:49 pm :
I don't think it works when you just change the map file with a text editor, you probably need to compile the map.

You can open the map you want to modify with the level editor and change the weapons there.



Zombie13@Posted: Fri Sep 24, 2010 2:06 pm :
You don't need to recompile if you just edit point based entities.

Any entity that is made of brushes needs to be compiled though.



AnthonyJa@Posted: Mon Sep 27, 2010 11:15 pm :
Z008MJ wrote:
Yet this does not work, what am i supposed to do?


Maybe a silly question, but did you do things like re-package it as a .pk4, with an appropriate filename etc? How certain are you that it's picking up your .map file rather than the original one?

To confirm it's using your modified map file, I'd tweak the name of one of the entities, and use "listEntities" at the console to confirm it's picked up.

I've replaced map entities at runtime through the code simply by changing the classname property, so IMO what you've described should work fine. Maybe you're accidentally changing the entity name instead? (eg it might be "weapon_shotgun_1" for the 1st one added in the map)



Z008MJ@Posted: Mon Sep 20, 2010 1:43 pm :
Now, as far as i know, i should just have to change the classname inside the map file, so if i change "weapon_shotgun" to "weapon_nailgun", then a Nailgun will spawn instead of a Shotgun. Yet this does not work, what am i supposed to do?



Tetzlaff@Posted: Thu Sep 23, 2010 7:49 pm :
I don't think it works when you just change the map file with a text editor, you probably need to compile the map.

You can open the map you want to modify with the level editor and change the weapons there.



Zombie13@Posted: Fri Sep 24, 2010 2:06 pm :
You don't need to recompile if you just edit point based entities.

Any entity that is made of brushes needs to be compiled though.



AnthonyJa@Posted: Mon Sep 27, 2010 11:15 pm :
Z008MJ wrote:
Yet this does not work, what am i supposed to do?


Maybe a silly question, but did you do things like re-package it as a .pk4, with an appropriate filename etc? How certain are you that it's picking up your .map file rather than the original one?

To confirm it's using your modified map file, I'd tweak the name of one of the entities, and use "listEntities" at the console to confirm it's picked up.

I've replaced map entities at runtime through the code simply by changing the classname property, so IMO what you've described should work fine. Maybe you're accidentally changing the entity name instead? (eg it might be "weapon_shotgun_1" for the 1st one added in the map)



Z008MJ@Posted: Mon Sep 20, 2010 1:43 pm :
Now, as far as i know, i should just have to change the classname inside the map file, so if i change "weapon_shotgun" to "weapon_nailgun", then a Nailgun will spawn instead of a Shotgun. Yet this does not work, what am i supposed to do?



Tetzlaff@Posted: Thu Sep 23, 2010 7:49 pm :
I don't think it works when you just change the map file with a text editor, you probably need to compile the map.

You can open the map you want to modify with the level editor and change the weapons there.



Zombie13@Posted: Fri Sep 24, 2010 2:06 pm :
You don't need to recompile if you just edit point based entities.

Any entity that is made of brushes needs to be compiled though.



AnthonyJa@Posted: Mon Sep 27, 2010 11:15 pm :
Z008MJ wrote:
Yet this does not work, what am i supposed to do?


Maybe a silly question, but did you do things like re-package it as a .pk4, with an appropriate filename etc? How certain are you that it's picking up your .map file rather than the original one?

To confirm it's using your modified map file, I'd tweak the name of one of the entities, and use "listEntities" at the console to confirm it's picked up.

I've replaced map entities at runtime through the code simply by changing the classname property, so IMO what you've described should work fine. Maybe you're accidentally changing the entity name instead? (eg it might be "weapon_shotgun_1" for the 1st one added in the map)