• 🏆 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!

Question about .j file

Status
Not open for further replies.
Level 2
Joined
Jan 30, 2020
Messages
10
Hi, long story short I am trying to edit my old map and import my new editted .j file into the map (the .j file is from a previous version that had return errors fixed) with mpqeditor which works fine and updates the information I need the only problem is that when it is imported it overwrites the new units and buildings that have been placed into this version with the old versions units and buildings? is there something in the .j file that does this and how can I fix it?
 
Last edited:
Level 2
Joined
Jan 30, 2020
Messages
10
I can't seem to find a CreateAllUnit function in there. any chance you can take a look/fix whatever is causing it to not update to the new versions units/buildings? Please. .j file is attached.
 

Attachments

  • war3map.j
    309.1 KB · Views: 31
Level 1
Joined
Apr 25, 2020
Messages
1
Hey Triggerhappy,
Trying to help out Hatchet with this one,

When you are saying manually update your main function with each update to preplaced objects, is that meaing we would need to manaully add a new line item for each unit added? For example, adding another line of "set u=CreateUnit(p,'h02N......." to the below to have another unit added?

(From the .j file around line 8400)

set p=Player(9)
set u=CreateUnit(p,'h02N',196.5,-12969.9,90.)
set u=CreateUnit(p,'h02N',300.7,-12974.2,90.)
set u=CreateUnit(p,'h02N',3224.1,-11378.5,90.)
set u=CreateUnit(p,'h02N',3320.5,-11381.1,90.)
set u=CreateUnit(p,'h037',2927.3,-13389.8,.0)
set u=CreateUnit(p,'n012',7368.6,-13645.3,90.)
 
Level 2
Joined
Jan 30, 2020
Messages
10
so in this function? and what do i actually need to do?

function main takes nothing returns nothing
local weathereffect we
local destructable d
local trigger t
local real XT
local integer TS
local integer i
local player p
local unit u
local integer unitID
local integer FS
local integer HS
local version v
local integer XS

(see attached image)


Because further down the script I have these texts for approximately 1000 lines (I have approx 1000 units):

set u=CreateUnit(p,'nskf',-6396.1,12599.7,324.237)
set u=CreateUnit(p,'ugho',-5458.8,11781.2,.0)
set u=CreateUnit(p,'uske',-5271.4,11662.8,.0)
set u=CreateUnit(p,'ugho',-5440.1,11461.4,.0)
set u=CreateUnit(p,'ugho',-5368.3,11798.5,.0)
set u=CreateUnit(p,'nskf',-6271.5,12744.4,324.237)
set u=CreateUnit(p,'nskf',-6718.9,12877.4,324.237)
set u=CreateUnit(p,'nskf',-7150.6,12500.4,324.237)
set u=CreateUnit(p,'nskf',-6931.6,11928.,324.237)
set u=CreateUnit(p,'nskf',-6984.8,11714.9,324.237)
set u=CreateUnit(p,'nska',-5944.1,12308.2,302.947)
set u=CreateUnit(p,'nska',-6271.9,11638.1,302.947)
set u=CreateUnit(p,'ugho',-5356.2,11678.,.0)
set u=CreateUnit(p,'ugho',-5347.2,11592.8,.0)
set u=CreateUnit(p,'ugho',-5346.2,11484.2,.0)
set u=CreateUnit(p,'uske',-6393.1,12251.9,323.148)
set u=CreateUnit(p,'uske',-6446.8,12195.6,323.148)
set u=CreateUnit(p,'uske',-6486.2,12147.1,323.148)
set u=CreateUnit(p,'uske',-6537.1,12082.3,327.953)
set u=CreateUnit(p,'ugho',-6715.3,12623.6,314.752)
set u=CreateUnit(p,'ugho',-6824.6,12496.9,314.752)
set u=CreateUnit(p,'nogl',-6111.4,11867.6,310.115)
set u=CreateUnit(p,'nogm',-6051.8,11967.7,303.989)

So is there no way except manually editing the script with the new units/building location the same as above?

Please note I cant actually access triggers in the World Editor only in the mpq editor via notepad++ because I had to deprotect my old map in order to restore it, i am aware it is against hive rules but I didnt really have a choice in order to bring the map back from the dead.
 

Attachments

  • hive.png
    hive.png
    117.8 KB · Views: 49
Status
Not open for further replies.
Top