Skip to content

Random questions I have regarding modding

2

Comments

  • elminsterelminster Member, Developer Posts: 16,317
    Nvrmind figured it out.
  • elminsterelminster Member, Developer Posts: 16,317
    I do have a question actually. Does anyone know if there is a way to make it so that you can only engage in a dialogue with someone if you are considered to be intoxicated?

    I tried looking under the trigger.ids with no luck. But I figured I'd ask all the same. It doesn't appear in the list under states in state.ids either.
  • elminsterelminster Member, Developer Posts: 16,317
    Nevermind figured that out as well.

    For anyone looking to do this in the future what you do is make the game look for negative luck. Mind you that could also include fatigue, so its not a perfect solution, but all things considered I think it works rather well.

    So in my case it looked something like this.

    IF ~NumTimesTalkedToGT(0)~ THEN
    BEGIN k9modesthelped
    SAY ~Your back again? You here to buy me a drink?~

    +~CheckStatLT(Player1,0,LUCK)~+ ~Yea I'm terrific~ EXIT
    ++ ~My apologies, I didn't mean to disturb you.~ EXIT
    END
  • elminsterelminster Member, Developer Posts: 16,317
    edited April 2015
    COPY_EXISTING ~k9EveOfWar/ARE/AR5200.are~ ~override/AR5200.are~
    COPY ~k9EveOfWar/ARE/k91000.are~ ~override/k91000.are~

    ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea BEGIN

    "AR5200" => "Exitwmp" // dryad falls

    END

    // add links from the new area to these area(s)
    ACTION_DEFINE_ASSOCIATIVE_ARRAY fromNewArea BEGIN
    "AR5200" => "ExitS" // dryad falls

    END

    // calls the function and returns the worldmap entry number for the new area
    LAUNCH_ACTION_FUNCTION sc#addWmpAre
    INT_VAR mapIcon = 55 // map icon
    xCoord = 320 // x coordinate
    yCoord = 1230 // y coordinate
    tTime = 6 // travel time *4, so two means eight hours
    inclSv = 1
    reachable = 1
    visited = 0
    visible = 0
    visibleAdjacent = 1
    STR_VAR areName = "k91000" // area reference, like "AR0700"
    strName = EVAL "Cyric Stronghold" // area name, like "Waukeen's Promenade"
    strDesc = EVAL "Cyric Stronghold" // area description which will show up when hovering the area on the worldmap


    END


    I can't seem to be able to get this to work. Every time I try to travel between my new area (k91000) and AR5200 the game crashes. The map icon image and text appear where they are supposed to and everything else seems fine.


    I've used Near Infinity to set AR5200's area south parameter to k91000. I've similarly done the same for k91000 (except for north).


    Any ideas for what could be causing the crashing? Also I found that I wasn't able to get the travel cursor to appear when trying to travel south from AR5200. Is there an additional step I need to take to unlock this?
    Post edited by elminster on
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    edited April 2015
    Have you tried adding the following to your action list:

    AddJournalEntry(@107,QUEST_DONE)
    AddJournalEntry(@1071,QUEST_DONE)
    AddJournalEntry(@1072,QUEST_DONE)

    Then, only do the last one with SOLVED_JOURNAL?

    EDIT: Whoops, wasn't reading the last page... Nevermind...
  • The user and all related content has been deleted.
  • elminsterelminster Member, Developer Posts: 16,317
    The new area has no CREs.
  • WhiteAgnusWhiteAgnus Member Posts: 112
    edited April 2015
    Hmm, did the entrance "Exitwmp" exist in your new area? If the entrance exists, is this entrancename unique?

    You could try if it crashes if you use

    ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea BEGIN

    "AR5200" => ""

    END

    instead of

    ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea BEGIN

    "AR5200" => "Exitwmp"

    END

    in the Array I think...

    For traveling to the south, you have to edit the Searchmap...
  • elminsterelminster Member, Developer Posts: 16,317

    Hmm, did the entrance "Exitwmp" exist in your new area? If the entrance exists, is this entrancename unique?

    You could try if it crashes if you use

    ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea BEGIN

    "AR5200" => ""

    END

    instead of

    ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea BEGIN

    "AR5200" => "Exitwmp"

    END

    in the Array I think...

    For traveling to the south, you have to edit the Searchmap...

    I tried modifying the entrance names to be something unique but that didn't appear to help. I tried looking into editing the searchmap but I'm not really sure what is involved in that.

    I also tried looking at this guide and using the IE Tileset Area editor but it crashed when I tried it with BGEE.

    http://www.shsforums.net/topic/28080-cuvs-area-making-class-tutorial/

  • elminsterelminster Member, Developer Posts: 16,317
    edited April 2015
    I may end up trying to do it with a tutorial I found for doing it in DLTCEP. We'll see how that goes :)

    http://www.simpilot.net/~sc/dltcep/index.htm
  • WhiteAgnusWhiteAgnus Member Posts: 112
    Hmm, IETME is too old for tisv2... ;) (If you want to use ist, you have to convert the tis files to v1... ;))

    DLTCEP would be the better tool... :smiley:

    The sc#addWmpAre Macro works great, I've tried this with following code, thats why I think there is a problem with your entrances...

    COPY_EXISTING ~AR5200.are~ ~override/k91000.are~

    ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea BEGIN
    "AR5200" => "Exit5100"
    END

    ACTION_DEFINE_ASSOCIATIVE_ARRAY fromNewArea BEGIN
    "AR5200" => "ExitS"
    END

    LAUNCH_ACTION_FUNCTION sc#addWmpAre
    INT_VAR mapIcon = 55
    xCoord = 320
    yCoord = 1230
    tTime = 6
    inclSv = 1
    reachable = 1
    visited = 0
    visible = 0
    visibleAdjacent = 1
    STR_VAR areName = "k91000"
    strName = EVAL "Cyric Stronghold"
    strDesc = EVAL "Cyric Stronghold"
    END

  • elminsterelminster Member, Developer Posts: 16,317
    edited April 2015


    COPY_EXISTING ~AR5200.are~ ~override/k91000.are~

    k91000 is actually just a copy of OH3000 (Rasaad's quest outdoors map) that has had all its actors removed from it (as well as a few other changes). Its not meant to be a copy of AR5200 (which is the map its connected to).
  • WhiteAgnusWhiteAgnus Member Posts: 112
    I tried it with OH3000 for testing purposes, and it worked great... (So maybe, something is wrong in your k91000.are... ;))

    COPY_EXISTING ~OH3000.are~ ~override/k91000.are~

    ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea BEGIN
    "AR5200" => "Entrance 2"
    END

    ACTION_DEFINE_ASSOCIATIVE_ARRAY fromNewArea BEGIN
    "AR5200" => "Exit5202"
    END

    LAUNCH_ACTION_FUNCTION sc#addWmpAre
    INT_VAR mapIcon = 55
    xCoord = 320
    yCoord = 1230
    tTime = 6
    inclSv = 1
    reachable = 1
    visited = 0
    visible = 0
    visibleAdjacent = 1
    STR_VAR areName = "k91000"
    strName = EVAL "Cyric Stronghold"
    strDesc = EVAL "Cyric Stronghold"
    END


  • elminsterelminster Member, Developer Posts: 16,317
    @WhiteAngus thanks it worked :)
  • CoM_SolaufeinCoM_Solaufein Member Posts: 2,606
    You actually got an area to work with the.world map macro? I've had nothing but problems with adding the Dark Side areas to bg ee
  • elminsterelminster Member, Developer Posts: 16,317
    Yea to be honest its still kind of buggy. But it is possible to go between the two maps. So for the time being I'm not going to worry about it given that this is for a secondary quest.
  • elminsterelminster Member, Developer Posts: 16,317
    edited April 2015
    What would I need to put if I wanted to add an info trigger to a map?

    Right now I have this



    COPY_EXISTING ~k9EveOfWar/ARE/k91000.are~ ~override/k91000.are~
    LAUNCH_PATCH_FUNCTION
    ADD_AREA_REGION_TRIGGER
    INT_VAR
    ab_RT_Type =1
    ab_RT_BbLX =2303
    ab_RT_BbLY =313
    ab_RT_BbHX =2340
    ab_RT_BbHY =400

    STR_VAR

    ab_RT_Name=~Bodies~

    END

    But it doesn't work.

    I got the idea from here

    http://www.shsforums.net/topic/46106-subcomponents-and-scripts/

    I tried also removing the INT_VAR and STR_VAR from this (and having "SET" instead in front of each of the lines like it shows here

    http://weidu.org/~thebigg/README-WeiDU.html#sec53

    but that didn't work.


    Any ideas? All I basically want is to have a point in the map where a player can click and it will show text ("bodies" in this case).
  • argent77argent77 Member Posts: 3,478
    edited April 2015
    I've never used ADD_AREA_REGION_TRIGGER. The patch function "fj_are_structure" should work similarly however. Code would look like this:
    COPY_EXISTING ~k9EveOfWar/ARE/k91000.are~ ~override~ PATCH_IF (SOURCE_SIZE > 0x11b) BEGIN // checking for valid ARE resource LPF fj_are_structure INT_VAR fj_type = 1 // 1: info region // bounding box of region fj_box_left = 2303 fj_box_top = 313 fj_box_right = 2340 fj_box_bottom = 400 fj_cursor_idx = 22 // 22: info cursor fj_flags = 0 // optional region flags fj_info_point_strref = RESOLVE_STR_REF(@1234) // displayed text // Actual coordinates of region polygon (required!). Specify combined X and Y coordinates. fj_vertex_0 = 2303 + (313 << 16) fj_vertex_1 = 2340 + (313 << 16) fj_vertex_2 = 2340 + (400 << 16) fj_vertex_3 = 2303 + (400 << 16) STR_VAR fj_structure_type = region // ARE structure type fj_name = your_region_name // region name END END
  • elminsterelminster Member, Developer Posts: 16,317
    Thanks for the help :)
  • elminsterelminster Member, Developer Posts: 16,317
    edited April 2015
    @argent77 out of curiosity if I wanted to use weidu to rename an existing infopoint (and by rename I mean change the text of the infopoint as it appears in game) how would I go about doing that? For examples sake lets say Info4801 (Nashkel Inn) which is found in the AR4800.are file (Nashkel).
    Post edited by elminster on
  • argent77argent77 Member Posts: 3,478
    The safest approach is probably by scanning all region structures in the ARE file until you find the one to modify and do your stuff.

    This is a (modified) example from my own mod:
    COPY_EXISTING ~ar4800.are~ ~override~ PATCH_IF (SOURCE_SIZE > 0x11b) BEGIN READ_SHORT 0x5a regions_count READ_LONG 0x5c regions_ofs FOR (i = 0 ; i < regions_count ; i += 1) BEGIN READ_ASCII (regions_ofs + i*0xc4) region_name (32) NULL // reading region name PATCH_IF (~%region_name%~ STRING_EQUAL_CASE ~Info4801~) BEGIN // checking region name SAY (regions_ofs + i*0xc4 + 0x64) ~Your new info text...~ // setting new info text i = regions_count // you should terminate the loop afterwards to speed up the installation process END END
    You can optionally check the region type as well to make sure you're modifying an info region.
  • elminsterelminster Member, Developer Posts: 16,317
    @argent77 so I'm trying to get two NPC's that are neutral to me to attack eachother. One is called k9fist and the other is k9fist2 (by that I mean both their cre name and their script name). They are basically just two renamed flaming fist members that only have one of two variations on this script.

    I've tried various things with no success. The examples I'm showing are for k9fist attacking k9fist2


    I've tried


    IF
    Global("k9FriendlyInnFight","GLOBAL",1)
    THEN
    RESPONSE #100

    Attack("k9Fist2")
    END



    IF
    Global("k9FriendlyInnFight","GLOBAL",1)
    THEN
    RESPONSE #100

    AttackReevaluate("k9Fist2",15)
    END


    IF
    Global("k9FriendlyInnFight","GLOBAL",1)
    THEN
    RESPONSE #100

    ActionOverride("k9Fist",Attack("k9Fist2")
    END

    IF
    Global("k9FriendlyInnFight","GLOBAL",1)
    THEN
    RESPONSE #100

    ActionOverride("k9Fist",GroupAttack("k9Fist2")
    END

    and probably other combinations as well. Is there like the equivalent of a force attack that I'm missing? The fist members seems to want to attack eachother they just don't do anything.
  • argent77argent77 Member Posts: 3,478
    It should work with the script blocks you mentioned. Although if you want to let them fight each other for a certain amount of time rather than to the death, AttackOneRound("scriptname") is probably a safer choice.

    There may be other issues that are preventing your characters from attacking each other. For example, did you double-check their script names? Are their scripts correctly assigned and their script conditions set? Are there other script blocks interfering with the fight? Are their weapons correctly equipped? Are the characters carrying too much weight? Are they under some kind of invisibility effect or otherwise untargetable?
  • WhiteAgnusWhiteAgnus Member Posts: 112
    Hmm, I think, I got a similar bug some times ago, how do you spawn the creatures? Via script or area patching?

    Go to the area and save, then investigate the DV of the creature in the save file...
  • elminsterelminster Member, Developer Posts: 16,317
    Its via script
  • elminsterelminster Member, Developer Posts: 16,317
    Anyways I managed to get it working. it looks like I had actually missed replacing one of their scripts and on the other character I gave them the wrong script name. So all is well. :)
  • elminsterelminster Member, Developer Posts: 16,317
    edited May 2015
    @argent77 Another question. Lets just say I wanted to make it so that charname (after a certain dialogue) recieved an item that was flagged as stolen. Giving charname the items is easy enough but how would I go about flagging that item stolen? I tried using Near Infinity but obviously had no success.
  • argent77argent77 Member Posts: 3,478
    You can't. The "Stolen" flag for items is set in the CRE file and there is no script action which can set it, afaik.
  • MusignyMusigny Member Posts: 1,027
    Perhaps you can pre-store the item in a CRE or ARE file with the stolen flag or you can store a kind of itemtoken with the stolen flag and then use a TransformItem() (with or without PickUpItem) to modify your item on the fly while preserving the flag states. This is just theoretical - I haven't tested it.
  • The user and all related content has been deleted.
Sign In or Register to comment.