Schnelle Bewegung auf der Karte. Hilfe!

  • Works great with merchantbailey. I'll check the rest later. I have another question about scripts. How to implement checking the player's attribute and issuing an item if the attribute is higher than necessary. In .cnv files, this is easy to do, but I need the same when opening a container. For example.

    Code
    ifcurrent; 
    ifplayer.ttl(perception>20); 
    player.additem(*item name*); 
    endif; 
    endif; 

    Such code will not work. Tell me how to do it right (if possible)?

  • In general you write this in the onload-script of the container:

    Code
    player.ifprop(perception>20);
    additem(xy);
    endif;

    But be aware that this will be called each time the map is loaded, so you need to use a title to only call the event once per savegame.

    Code
    player.ifnottitle(chestitem1added);
    player.ifprop(perception>20);
    additem(xy);
    player.addtitle(chestitem1added);
    endif;
    endif;

    The title name can also be another name.

    Also be aware of the following problem. If the player hasn't enough perception but already filled the chest with items, the item won't be added to the chest anymore if the player has enough perception later.

    Oh and if you stay on the same map and increase your perception the item won't be added if you don't change the map since the onloadscript isn't called then. Another solution, maybe a better one:

    Add the second code to the onactivate-script of the container.

    Wo ich bin klappt nichts,...
    aber ich kann ja nicht überall sein.

  • Thanks!


    One more question.

    How to correctly write in a trigger with the following order of events:

    1) When entering a location (its desired area)

    2) Our character and his party freezes.

    3) One peaceful NPC from the "castle" faction attacked another. The second attacked the first.

    4) Others do not interfere.

    5) After the death of one of them (any), a log journal is added (the page is made, of course).

    6) The trigger is disabled to no longer work.

  • That's complicated since there are some different ways for different scenarios. But this should work in general although there might be some more things to be considered.

    GsOnTrigger, rightclick ->Define Gridspace Region (that's 1.)

    OnTrigger-script:

    Code
    ifcurrent;
    player.setprop(frozen=true); (that's 2.)
    freezeparty; (that's 2.)
    NPCGuid1.makeenemy(NPCGuid2); (that's 3.)
    NPCGuid2.makeenemy(NPCGuid1); (that's 3.)
    Triggerguid.setprop(triggerenabled=false); (that's 6.)
    endif;

    The Alliance of both mustn't be set so: Alliance= (that's 4.)

    Both NPCs OnDie-script

    Code
    player.setprop(frozen=false);
    unfreezeparty;
    (if necessary for you)
    OtherNPCGuid.setprop(Alliance=castle);
    (if its a journal)
    Journalentry(name); (that's 5.)
    (if its an adventure log)
    Adventure(name); (that's 5.)

    To prevent a bug by player behaviour you should add the unfreezeparty; to all gsontriggerscripts on that map which leads to another map, since you can kick some partymembers during the fight and then they would be frozen forever after letting them join again.

    Wo ich bin klappt nichts,...
    aber ich kann ja nicht überall sein.

  • You haven't set the gridtiles in normal zoom mode. If you set them in Zoom-in or Zoom-out they won't be calculated correctly.

    BTW: "Triggerguid" means the guid of the gsontrigger ->gsOnTrigger2CEBD32FEDB1510

    Wo ich bin klappt nichts,...
    aber ich kann ja nicht überall sein.

  • I've taken a deeper look into it.

    First you need to set madden's alliance to madden and Kent's to kent. Then change the script from:

    Code
    Siege20000500190048004220.makeenemy(Siege20000500190055291350
    Siege20000500190055291350.makeenemy(Siege20000500190048004220);
    to:
    Siege20000500190048004220.makeenemy(madden);
    Siege20000500190055291350.makeenemy(kent);

    Then change their IdleDuty in AI_Idle back to stand and set combative to true.

    And maybe move Kent a bit downwards since the pillar between them might be interfer in their line of sight.

    Wo ich bin klappt nichts,...
    aber ich kann ja nicht überall sein.

  • Thanks, but I already corrected myself, your advice. Everything works as it should. I removed the freeze, it is more logical if this variant of the quest (give the letter, not give it, arrange a fight) will be completed BEFORE the second chapter (when companions become available).

    New problem: NobleBailey transit doesn't work. I edited the "Symbol" file, added the ability to go to the selected location from others .. but it does not work. With merchantbailey, this problem did not arise. Could you be wrong with the coordinates? Or did I forget something? I checked the accuracy of the names, there are no typos.

  • One thing you have to consider is that not only the map but also the specific pathcorner destination ("levelpointxy") has to be entered before the quicktravel works.

    NobleBaileyOffLimits.bmp already existed with it's coordinates, so the coordinates are correct since I didn't need to change them.

    Here are the names I used maybe there is a typo in mine your yours.

    NewHotspot := THotspot.Create( Self, 263, 191, 'NobleBaileyAvaliable.bmp', 'NobleBaileyUnAvaliable.bmp', Offset );

    NewTransitPoint := TTransitPoint.Create( AOwner, 640, 200, 'CutNobleBailey.bmp', 'noblebailey', FOffset );

    Wo ich bin klappt nichts,...
    aber ich kann ja nicht überall sein.

  • Sorry, I couldn't answer earlier, I was on a business trip.

    If I made a mistake with the names of the pictures, then the game would freeze during transit (any).

    Here, the trigger from the inner castle.


    Code
    ifcurrent;
    DoorArched2CEBD40F745FF6D.Setprop(Closed=false);
    DoorArched2CEBD40F746C764.setprop(closed=false);
    loadmap(noblebailey,default,levelpoint1,OutrBailey|#noblebailey.GS2#|ob1b,default,levelpoint1);
    endif;


    And here is the trigger output.


    Code
    ifcurrent;
    DoorArched2CEBD40F7996778.Setprop(Closed=false);
    DoorArched2CEBD40F7996759.setprop(closed=false);
    loadmap(ikeep01,default,levelpoint99,|#noblebailey.GS2#|ob1b,default,levelpoint1);
    endif;


    And I also attach the file symbol.

  • The trigger from the inner castle should be like this (a new one in ikeep01):

    Code
    loadmap(noblebailey,default,levelpoint1,OutrBailey|#IKeep01.GS9#|ob1b,default,levelpoint1);

    Also there's is a comma where it shouldn't be in loadmap(ikeep01,default,levelpoint99,|#noblebailey.GS2#|ob1b,default,levelpoint1);

    Can you select the noblebailey also by clicking on specific point on the transitionscreen when going from the inner castle directly?


    And a small hint. This is a better way to script a door for closing it:

    Code
    DoorArched2CEBD40F745FF6D.doaction(Close);
    DoorArched2CEBD40F746C764.doaction(Close);

    Wo ich bin klappt nichts,...
    aber ich kann ja nicht überall sein.

  • Hello. I have two questions:

    1) Is there a video tutorial on creating your characters, equipping them and adding it to the game ? Text guides don't help

    I create in Character Lab (run as administrator and 8bit low color mode) using base layer, save. I put the files in the right places, then I add a new character to the editor. When I put it on the map, I get it (see picture). The character does not appear in the game.

    What did I forget to do?


    I tried to create on the basis of existing characters (copy files, edit, for example, his head and rename the copy) - but then the character generally disappears from the editor.



    2) The initial map changes in siege... Is it possible to change the final one (after the death of Mithras) in order to continue the game? Continue after loading the "endgame" map. Or does it require intervention in the source code?

  • Hi,

    1. No there isn't. But I will try a wirting a text guid matching your problem:

    When saving a character you get two pox files. The one which is saved in another folder called editor has to be moved to:

    .../Resources/editor/spriteobject/character/layered/...

    The other on stays in:

    .../Resources/spriteobject/character/layered/...

    Then in ChaptEd you have to add the new character from .../Resources/spriteobject/character/layered/... and not from .../Resources/editor/spriteobject/character/layered/.... Otherwise the character is invisible since you just added a "character-picture". The editor file is needed since layered characters don't have frame pictures in their file, only a link to the layered images. Therefore ChaptEd wouldn't display a layered Character.


    2. You just have to remove/change some scripts on the endgame.lvl like it is for the chapter 7 extension. Nothing needs to be changed in the Sourcecode. To explain everything in depth would take a while, which I don't have at the moment. But I've attached the endgame.lvl from chapter 7 down here: