Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Ergebnis 1 bis 10 von 10
  1. Beiträge anzeigen #1 Zitieren
    Lehrling Avatar von Fabiosek
    Registriert seit
    Dec 2013
    Beiträge
    42
     
    Fabiosek ist offline

    Gothic 2 -Freepoints doesn't work

    Hi!

    I have a problem. In the world of the game, I added a waypoint named "MOLERAT_SPAWN_01".

    I entered his calling into a startup: Wld_InsertNpc(MOLERAT,"MOLERAT_SPAWN_01");

    Of course, he appears on WP, but he does nothing. I added a freepoint next to it for this purpose named "FP_ROAM_MOLERAT_SPAWN_01". It is next to WP "MOLERAT_SPAWN_01". Molerat still stands still and does not move. There must be more than one freepoint? Maybe it was badly named?

    The same is with meatbug, scavanger etc.

  2. Beiträge anzeigen #2 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline
    Change your freepoint name to FP_ROAM****.
    All functions are looking for specific prefixes of freepoints:

    FP_ROAM - NPC is roaming on freepoint.
    FP_SLEEP - NPC is sleeping on freepoint.

  3. Beiträge anzeigen #3 Zitieren
    Lehrling Avatar von Fabiosek
    Registriert seit
    Dec 2013
    Beiträge
    42
     
    Fabiosek ist offline
    Zitat Zitat von F a w k e s Beitrag anzeigen
    Change your freepoint name to FP_ROAM****.
    All functions are looking for specific prefixes of freepoints:

    FP_ROAM - NPC is roaming on freepoint.
    FP_SLEEP - NPC is sleeping on freepoint.
    Thanks, but I wrote that I have the following name: FP_ROAM_MOLERAT_SPAWN_01.

  4. Beiträge anzeigen #4 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline
    Ah, sorry seems like I am completely blind in that case I am not sure where the issue can be. Maybe try to put more than 1 FP next to your WP.

  5. Beiträge anzeigen #5 Zitieren
    Lehrling Avatar von Fabiosek
    Registriert seit
    Dec 2013
    Beiträge
    42
     
    Fabiosek ist offline
    Zitat Zitat von F a w k e s Beitrag anzeigen
    Ah, sorry seems like I am completely blind in that case I am not sure where the issue can be. Maybe try to put more than 1 FP next to your WP.
    I added four, nothing helped.

  6. Beiträge anzeigen #6 Zitieren
    Knight
    Registriert seit
    Aug 2009
    Ort
    Hessen
    Beiträge
    1.487
     
    Cryp18Struct ist offline
    You can try to put some prints in to the ZS loop function, this can tell you what goes wrong. For example you can add like this to ZS_MM_Rtn_Roam_loop:
    Code:
    	if (Npc_GetStateTime(self) > wanderTime)
    	{
    		if (Wld_IsNextFPAvailable(self,	"FP_ROAM"))	//NEXT, sonst findet er seinen eigenen FP = besetzt!
    		{
    			print("found FP_ROAM, moving there");								
    			AI_GotoNextFP	(self,	"FP_ROAM");
    		}else{
    			print("cant find next FP_ROAM");
    		};
    		//sonst stehenbleiben
    		
    		self.aivar[AIV_TAPOSITION] = NOTINPOS;
    	}
    	else
    	{
    		if (Hlp_Random(1000) <= 5)
    		{
    			var int randomMove;
    			randomMove = Hlp_Random(3);
    			if (randomMove == 0) {AI_PlayAni(self, "R_ROAM1");};
    			if (randomMove == 1) {AI_PlayAni(self, "R_ROAM2");};
    			if (randomMove == 2) {AI_PlayAni(self, "R_ROAM3");};
    		};
    	};
    If you activate MARVIN/debug mode you can enter in the console(F2) "toggle freepoints" to see them ingame.

  7. Beiträge anzeigen #7 Zitieren
    Lehrling Avatar von Fabiosek
    Registriert seit
    Dec 2013
    Beiträge
    42
     
    Fabiosek ist offline
    Zitat Zitat von Cryp18Struct Beitrag anzeigen
    You can try to put some prints in to the ZS loop function, this can tell you what goes wrong. For example you can add like this to ZS_MM_Rtn_Roam_loop:
    Code:
        if (Npc_GetStateTime(self) > wanderTime)
        {
            if (Wld_IsNextFPAvailable(self,    "FP_ROAM"))    //NEXT, sonst findet er seinen eigenen FP = besetzt!
            {
                print("found FP_ROAM, moving there");                                
                AI_GotoNextFP    (self,    "FP_ROAM");
            }else{
                print("cant find next FP_ROAM");
            };
            //sonst stehenbleiben
            
            self.aivar[AIV_TAPOSITION] = NOTINPOS;
        }
        else
        {
            if (Hlp_Random(1000) <= 5)
            {
                var int randomMove;
                randomMove = Hlp_Random(3);
                if (randomMove == 0) {AI_PlayAni(self, "R_ROAM1");};
                if (randomMove == 1) {AI_PlayAni(self, "R_ROAM2");};
                if (randomMove == 2) {AI_PlayAni(self, "R_ROAM3");};
            };
        };
    If you activate MARVIN/debug mode you can enter in the console(F2) "toggle freepoints" to see them ingame.
    Hmm, doesn't work. Does not display print.

    I created a crude look:

    [Bild: mapjpg_qeawnha.jpg]

    There are two waypoints and two freepoints. Monsters (Scavengers) are spawned on WP. With WP they go to FP the first time, and then they are still standing.

    Btw. I also added the third FP in the middle. It did not do anything.
    Geändert von Fabiosek (23.09.2018 um 11:50 Uhr)

  8. Beiträge anzeigen #8 Zitieren
    Knight
    Registriert seit
    Aug 2009
    Ort
    Hessen
    Beiträge
    1.487
     
    Cryp18Struct ist offline
    Prints not showing up at all is weird.
    If you want a monster to roam you need 2 freepoints("FP_ROAM_XYZ") for that monster. So that it can walk from one freepoint to another.
    If you place freepoints like this:
    [Bild: attachment.php?s=2af3917aec3b07cc7973a856b9e63c53&attachmentid=47275&d=1537705304&thumb=1]
    And insert one Lurker at FP_ROAM_A and insert one Molerat at FP_ROAM_C, what should happen is that the Lurker always wanders between A and B, while the molerat always wanders between C and D.

    edit: Adjusted example, Scavengers are normally not roaming, they have sleep and eatGround set. If you want scavengers to roam, you would need to adjust the NPC script.
    Geändert von Cryp18Struct (23.09.2018 um 13:27 Uhr)

  9. Beiträge anzeigen #9 Zitieren
    Lehrling Avatar von Fabiosek
    Registriert seit
    Dec 2013
    Beiträge
    42
     
    Fabiosek ist offline
    Zitat Zitat von Cryp18Struct Beitrag anzeigen
    Prints not showing up at all is weird.
    If you want a monster to roam you need 2 freepoints("FP_ROAM_XYZ") for that monster. So that it can walk from one freepoint to another.
    If you place freepoints like this:
    [Bild: attachment.php?s=2af3917aec3b07cc7973a856b9e63c53&attachmentid=47275&d=1537705304&thumb=1]
    And insert one Scavenger at FP_ROAM_A and insert one Molerat at FP_ROAM_C, what should happen is that the Scavenger always wanders between A and B, while the molerat always wanders between C and D.

    edit: NVM, Scavengers are normally not roaming, they have sleep and eatGround set. If you want scavengers to roam, you would need to adjust the NPC script.
    Could you send me this as a test zen? The world as a plain empty spot with the correct setting + code for startup. I would like to analyze it. There are too many objects on Khorinis.

  10. Beiträge anzeigen #10 Zitieren
    Lehrling Avatar von Fabiosek
    Registriert seit
    Dec 2013
    Beiträge
    42
     
    Fabiosek ist offline
    Zitat Zitat von Fabiosek Beitrag anzeigen
    Could you send me this as a test zen? The world as a plain empty spot with the correct setting + code for startup. I would like to analyze it. There are too many objects on Khorinis.
    EDIT: Thanks @Cryp18Struct.

    It's work.

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide