• πŸ† Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. πŸ”—Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Crash] [Help] Cannot find trigger 'CreateTimerBJ' from database when opening .w3m map file by WC3 RoC

Status
Not open for further replies.
Level 2
Joined
Dec 1, 2018
Messages
8
Hi sir,

I need your help, I have created a WC3 RoC map several years ago , when I try to open it by WC3 classic game but it pop up Trigger does not exist in database: CreateTimerBJ, can anyone help to advise how I can do to solve the problem?

Thanks,
Jacky
 

Attachments

  • (5)EarthDefence_v3.0_final.w3m
    548.9 KB · Views: 49
Last edited:
Level 2
Joined
Dec 1, 2018
Messages
8
The .wtg file (GUI trigger data) is corrupted; not even my RoC 1.00 editor was capable of opening it. You'll have to remove that file from your map, and remake your triggers.

Thanks, that's so bad for me.....

I forgot that when I create the map if there is any 3rd-party plugins I have used, as it was created in year 2003, is it possible to open the map by 3rd-party tool to check the trigger settings?
 
Last edited:
Level 2
Joined
Dec 1, 2018
Messages
8
The only one I can think of is the MPQ Editor by Ladik. You'll have to delete the wtg file, and read the map script through the war3map.j file, which is entirely written in JASS.

Sorry, I have downloaded the MPQ editor, but I could not find .mpq file from the WC3 classic game folder, where I can find it?

===========================================================

OK, I just googled it, the classical game has hided the MPQ files.....Orz

I decided to buy old CD game and then re-install game with it to have real MPQ files......
 
Last edited:
Level 2
Joined
Dec 1, 2018
Messages
8
You were supposed to open your map with the mpq editor, not the actual mpqs

Ooops.......

OK, I have opened it, so, what can I do next? Delete the war3map.wtg, and then?

atR1Dop.jpg

atR1Dop
 
Level 13
Joined
May 10, 2009
Messages
868
Yes, manually. That process is tedious, but it should work fine in the end. In order to do so, first, export the war3map.j, open it with any text editor / JassCraft, and check out all custom triggers declared in it.

All of your previous GUI triggers are between these blocks:

JASS:
//***************************************************************************
//*
//*  Triggers
//*
//***************************************************************************
and
JASS:
//===========================================================================
function InitCustomTriggers takes nothing returns nothing

...
The other lines of code were generated by the editor. Except for the global variables (GUI), which are within the globals / endglobals block.

For example:
Triggers
JASS:
//===========================================================================
// Trigger: Setting
//
// Game intro when game start
//===========================================================================
function Trig_Setting_Actions takes nothing returns nothing
    call DisplayTimedTextToForce( GetPlayersAll(), 60.00, "TRIGSTR_078" )
    call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_079", "TRIGSTR_080", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
endfunction

//===========================================================================
function InitTrig_Setting takes nothing returns nothing
    set gg_trg_Setting = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Setting, 0.00 )
    call TriggerAddAction( gg_trg_Setting, function Trig_Setting_Actions )
endfunction
The above code would look like this in GUI
  • Setting
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) for 60.00 seconds the text: TEXT_HERE
      • Quest - Create a Required quest titled Name with the description Description, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
Global Variables - this one is defined at the top of your war3map.j file:
JASS:
globals
    // User-defined
    // GUI variables have the "udg_" as prefix here.
    timer               udg_Timer                  = null
    unit                udg_Jack                   = null
    unit                udg_Hank                   = null
    unit                udg_Charles                = null
    unit                udg_Brian                  = null
    unit                udg_Johnny                 = null
    ...                 ...                        ...

  // Generated
  // Ignore the variables declared from now on, because the editor generated them.
  ...

endglobals
upload_2018-12-3_20-23-39.png



NOTE: TRIGSTR_XXX are string values declared in a .WTS file within your map. Export and open it with a text editor too. E.g.: TRIGSTR_078 has this value
Code:
STRING 78
{
Mission Object:
-  Destroy three enemy's force
-  Kill The Lord of Death Forest - Solon
-  Take the Gate Stone (for Special Heros)
}

Also, there was a total of 50 custom triggers in the old version of your map.
 
Last edited:
Level 2
Joined
Dec 1, 2018
Messages
8
Yes, manually. That process is tedious, but it should work fine in the end. In order to do so, first, export the war3map.j, open it with any text editor / JassCraft, and check out all custom triggers declared in it.

All of your previous GUI triggers are between these blocks:

JASS:
//***************************************************************************
//*
//*  Triggers
//*
//***************************************************************************
and
JASS:
//===========================================================================
function InitCustomTriggers takes nothing returns nothing

...
The other lines of code were generated by the editor. Except for the global variables (GUI), which are within the globals / endglobals block.

For example:
Triggers
JASS:
//===========================================================================
// Trigger: Setting
//
// Game intro when game start
//===========================================================================
function Trig_Setting_Actions takes nothing returns nothing
    call DisplayTimedTextToForce( GetPlayersAll(), 60.00, "TRIGSTR_078" )
    call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_079", "TRIGSTR_080", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
endfunction

//===========================================================================
function InitTrig_Setting takes nothing returns nothing
    set gg_trg_Setting = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Setting, 0.00 )
    call TriggerAddAction( gg_trg_Setting, function Trig_Setting_Actions )
endfunction
The above code would look like this in GUI
  • Setting
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) for 60.00 seconds the text: TEXT_HERE
      • Quest - Create a Required quest titled Name with the description Description, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
Global Variables - this one is defined at the top of your war3map.j file:
JASS:
globals
    // User-defined
    // GUI variables have the "udg_" as prefix here.
    timer               udg_Timer                  = null
    unit                udg_Jack                   = null
    unit                udg_Hank                   = null
    unit                udg_Charles                = null
    unit                udg_Brian                  = null
    unit                udg_Johnny                 = null
    ...                 ...                        ...

  // Generated
  // Ignore the variables declared from now on, because the editor generated them.
  ...

endglobals
View attachment 310977


NOTE: TRIGSTR_XXX are string values declared in a .WTS file within your map. Export and open it with a text editor too. E.g.: TRIGSTR_078 has this value
Code:
STRING 78
{
Mission Object:
-  Destroy three enemy's force
-  Kill The Lord of Death Forest - Solon
-  Take the Gate Stone (for Special Heros)
}

Also, there was a total of 50 custom triggers in the old version of your map.

Thanks so much, appreciate your help, I will try it.
 
The WTG file isn't corrupted. He's been using a custom trigger function that maps to CreateTimerBJ, probably using an editor extension like WEU.
I've stripped the offending function from the map for you and it should now be perfectly openable in the vanilla editor.
 

Attachments

  • (5)EarthDefence_v3.0_final_fixed.w3m
    559.5 KB · Views: 49
Level 13
Joined
May 10, 2009
Messages
868
The WTG file isn't corrupted. He's been using a custom trigger function that maps to CreateTimerBJ, probably using an editor extension like WEU.
I've stripped the offending function from the map for you and it should now be perfectly openable in the vanilla editor.

That's nice!

I honestly thought of it in such way because the CreateTimerBJ function exists in blizzard.j, and I also thought those third party softwares wouldn't change BJ funcs.
 
Last edited:
Status
Not open for further replies.
Top