Flag Locator Program

Discussion in 'General Modification' started by Phalzyr, Oct 1, 2003.

Remove all ads!
  1. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    1
    Would any mods be interested in my flag location covnerter program so you can see what cords a flag needs to be for auto adding flags? I got hommlet done and tested and working on nulb and fleshing it out some, still not sure how they get the real cords maybe a better math minded person can let me know, I just worked from a know point (500,500) its true x,y cords (homlett is 1050,750) and estrapulating the difference with a calculation I finally figured out. Nulb was larger so to make it a resonable size for program I reduce it by half (half the map image not the full image, so 1/4 fulll image).

    When you guys start adding quests and such, unless they do release an map editor. it might be helpful for door cords to (I'd assume they use the same). Have you guys figure out how to add door transition? I might add custom map support but right now that take a little user know how since I don't know the math formula for real xy translation. Anywho back to see if nulb is working right.
     
  2. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    1
    BTW I noticed yet another bad limitation :( It seems (unless I just had something wrong) that the limit to the number of maps that have flags on them is 8. (for auto adding)
     
  3. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    1
    I thought you might not have a clue what I was talking about since no replies so I thought I'd put up a 1.0 version for exitium, dhoom, other main mods to look at. I don't really want my site to be hit a lot so if you like it could you host it. It is just the exe no installer or anything just make a dir for it and if you want you can copy the mes files into the dir(it'll create blank ones if not) or just copy and paste to them(from the new ones) to the real ones whichever.

    I added it so that it will write out to the mes files by appending the code whenever you click map IF you selected option to do this. Note I haven't added any line numbering or such that'd have to be done manually)

    Now if they just get rid of some of the limitations and...

    http://www.kasec.org/flaglocfinder.rar
     
    Last edited: Oct 1, 2003
  4. Nomad_Wanderer

    Nomad_Wanderer Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    305
    Likes Received:
    0
    This is a huge addition! I think you should start to polish this for a release next week. (even if we go live with the hommlet stuff only)
     
  5. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    1
    actually it is nulb and hommlet now :D (didn't you see the menu option up top?), What do you find not polished about it? what feautures would you like added?
     
  6. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    1
    BTw for those curious programers here is the formula I got to work: (in delphi code hopefully it looks ok on here)

    if imageon = 'hommlet' then
    begin
    fullunit := 5; //norm scale width difference between to points / point dif
    //ie norm x cord was (1050 and 800 = 250) calc x cord was (500 and 450 = 50(or was it 500 and 550))
    //so 250/50 = 5 each unit of x
    fullunitb := 3.5; //norm scale height between to points / point dif
    xx := 1050; //500,500 in x,y cords
    yy := 750;
    end;
    if imageon = 'nulb' then
    begin
    fullunit := 10; //half norm scale width difference between to points / point dif
    //it is same as above dif but since it is half size I times these by 2
    fullunitb := 7; //half norm scale height difference / 50
    xx := 944; //500,500 in x,y cords
    yy := 820;
    end;

    I put up a flag at 500,500 according to game, on each map and just calculate the difference from that point to another one on the map. x doesn't go left and right ingame it is corner to corner that why it took me a bit to figure out but still would love to have real calculation method somehow so custom maps wouldn't need the x,y association to 500,500 or simliar spot.
     
    Last edited: Oct 1, 2003
  7. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    1
    oops forgot the actual calculating meat of it hehe:

    xn := xx - x;
    yn := yy - y;
    xb := xn;
    yb := yn;
    try
    if xn < 0 then
    begin
    xb := xn * -1;
    end;
    if yn < 0 then
    begin
    yb := yn * -1;
    end;
    if xn < 0 then
    begin
    xx := 500 - round(xb / fullunit);
    yy := 500 + round(xb / fullunit);
    end
    else
    begin
    xx := 500 + round(xb / fullunit);
    yy := 500 - round(xb / fullunit);
    end;
    if yn < 0 then
    begin
    xx := xx + round(yb / fullunitb);
    yy := yy + round(yb / fullunitb);
    end
    else
    begin
    xx := xx - round(yb / fullunitb);
    yy := yy - round(yb / fullunitb);
    end;
     
  8. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    1
    Does any mods think this will be useful? have any suggestion on features to add? Maps you'd like me to add to it?
     
Our Host!