Jump to content


Photo

sc#addWmpAre details

dumb as heck

  • Please log in to reply
29 replies to this topic

#21 Almateria

Almateria

    most garbage person

  • Modder
  • 969 posts

Posted 01 August 2014 - 01:21 PM

GET_STRREF, much like GET_STREF, throws an error at me.

 

GET_STRREF 70658 strName
GET_STRREF 70658 strDesc
LAUNCH_ACTION_FUNCTION sc#addWmpAre
	INT_VAR
		mapIcon = 17
		xCoord = 272
		yCoord = 128
		tTime = 3
		inclSv = 0
		reachable = 0
		visited = 0
		visible = 0
		visibleAdjacent = 0
	STR_VAR 
		areName = ~L-SAR1~
		worldmap = ~worldm25~

im trying to do it like this so maybe that's the beef


Edited by Almateria, 01 August 2014 - 02:32 PM.


#22 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 02 August 2014 - 01:32 AM

If that is literally the code you are using, you need to pass strName and strDesc to the function and close with an END. Also, you want ACTION_GET_STRREF.


Edited by Wisp, 02 August 2014 - 01:33 AM.


#23 Almateria

Almateria

    most garbage person

  • Modder
  • 969 posts

Posted 02 August 2014 - 02:08 AM

Ehh, I thought it worked like OUTER_SET. Here's how it's coded right now:

 

ACTION_GET_STRREF 70658 %SarName%
LAUNCH_ACTION_FUNCTION sc#addWmpAre
	INT_VAR
		mapIcon = 17
		xCoord = 272
		yCoord = 128
		tTime = 3
		inclSv = 0
		reachable = 0
		visited = 0
		visible = 0
		visibleAdjacent = 0
	STR_VAR 
		areName = ~L-SAR1~
		strName = %SarName%
		strDesc = %SarName%
		worldmap = ~worldm25~
RET areNum = areNum END


So... still not working. :(


Edited by Almateria, 02 August 2014 - 02:10 AM.


#24 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 02 August 2014 - 02:16 AM

You have some evaluation errors (and there should not be any percents in ACTION_GET_STRREF). Try this:
ACTION_GET_STRREF 70658 SarName
LAUNCH_ACTION_FUNCTION sc#addWmpAre
	INT_VAR
		mapIcon = 17
		xCoord = 272
		yCoord = 128
		tTime = 3
		inclSv = 0
		reachable = 0
		visited = 0
		visible = 0
		visibleAdjacent = 0
	STR_VAR 
		areName = ~L-SAR1~
		strName = EVAL "%SarName%"
		strDesc = EVAL "%SarName%"
		worldmap = ~worldm25~
RET areNum = areNum END
Yeah, passing string variables to functions like this is clumsy.

Edited by Wisp, 02 August 2014 - 02:17 AM.


#25 Almateria

Almateria

    most garbage person

  • Modder
  • 969 posts

Posted 03 August 2014 - 11:58 AM

Thanks, Wisp. You sound grumpy like 99% of the time but are a pretty great guy.



#26 Solaufein

Solaufein

    No fate but what we make

  • Modder
  • 263 posts

Posted 12 August 2014 - 09:55 AM

How many areas should be added to the

ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea
ACTION_DEFINE_ASSOCIATIVE_ARRAY fromNewArea

I only have the areas adjacent to the new area on the world map.


Her lips were red, her looks were free
Her locks were as yellow as gold
Her skin was white as leprosy.
The Nightmare Life-in-Death was she,
Who thicks man's blood with cold.

Samuel Taylor Coleridge

http://teambg.net
The Undying
 

#27 Almateria

Almateria

    most garbage person

  • Modder
  • 969 posts

Posted 12 August 2014 - 10:54 AM

Add all the areas, less chance of screwing everything up



#28 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 12 August 2014 - 11:21 AM


How many areas should be added to the
ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea
ACTION_DEFINE_ASSOCIATIVE_ARRAY fromNewArea
I only have the areas adjacent to the new area on the world map.

Add all the areas, less chance of screwing everything up


Or not... see as I see it, the purpose of the function is to place the area in relation to the others, now it can be fine if the area is inside the Athkatla that you get it to show up when you exit most of the areas, but say it's outside the city gate, and you should only enter it from the city gate, you should not add all the others.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#29 Almateria

Almateria

    most garbage person

  • Modder
  • 969 posts

Posted 12 August 2014 - 12:55 PM

My game crashed whenever I tried to enter an area from one that hasn't been defined in the array v:(v



#30 Solaufein

Solaufein

    No fate but what we make

  • Modder
  • 263 posts

Posted 17 August 2014 - 03:05 PM

No of course it still crashes and this is going from an area in the array. G'damn I hate modding. This is the main thing that is keeping me from releasing an open beta of DSotSC for BG:EE.

 

I went from the East Wood of Sharp Teeth to Wood of Sharp Teeth. Right next to each other, both in their respective array. Here's the code for them.

 

// Wood of Sharp Teeth
// add links from these area(s) to the new area
ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea BEGIN
    "AR2400" => "Exitwmp"       // Peldvale
    "AR3000" => "Exitwmp"       // Spiderwood
    "AR2900" => "Exitwmp"       // Larswood
    "AR1900" => "Exitwmp"       // Bandit Camp
    "ARC012" => "Exitwmp"       // East Wood of Sharp Teeth
    "ARC013" => "Exitwmp"       // Forest of Forgotten Souls
END

// add links from the new area to these area(s)
ACTION_DEFINE_ASSOCIATIVE_ARRAY fromNewArea BEGIN
    "AR2400" => "ExitW"      // Peldvale
    "AR3000" => "ExitS"       // Spiderwood
    "AR2900" => "ExitSW"       // Larswood
    "AR1900" => "ExitNW"       // Bandit Camp
    "ARC012" => "ExitN"       //  East Wood of Sharp Teeth
    "ARC013" => "ExitN"       // Forest of Forgotten Souls
END

// Wood of Sharp Teeth
// calls the function and returns the worldmap entry number for the new area
LAUNCH_ACTION_FUNCTION sc#addWmpAre
    INT_VAR mapIcon = 11           // map icon
            xCoord  = 866          // x coordinate
            yCoord  = 491          // y coordinate
            tTime   = 2            // travel time *4, so two means eight hours
            inclSv  = 1

    STR_VAR areName = "ARC011"     // area reference, like "AR0700"
            strName = "Wood of Sharp Teeth" // area name, like "Waukeen's Promenade"
            strDesc = "Wood of Sharp Teeth" // area description which will show up when hovering the area on the worldmap

END

// East Wood of Sharp Teeth
// add links from these area(s) to the new area
ACTION_DEFINE_ASSOCIATIVE_ARRAY toNewArea BEGIN
  "AR2400" => "Exitwmp"       // Peldvale
  "AR3000" => "Exitwmp"       // Spiderwood
  "AR2900" => "Exitwmp"       // Larswood
  "AR1900" => "Exitwmp"       // Bandit Camp
  "ARC011" => "Exitwmp"       // Wood of Sharp Teeth
  "ARC013" => "Exitwmp"       // Forest of Forgotten Souls
END

// add links from the new area to these area(s)
ACTION_DEFINE_ASSOCIATIVE_ARRAY fromNewArea BEGIN
    "AR2400" => "ExitW"      // Peldvale
    "AR3000" => "ExitS"       // Spiderwood
    "AR2900" => "ExitSW"       // Larswood
    "AR1900" => "ExitNW"       // Bandit Camp
    "ARC011" => "ExitS"       //  Wood of Sharp Teeth
    "ARC013" => "ExitN"       // Forest of Forgotten Souls
END

// East Wood of Sharp Teeth
// calls the function and returns the worldmap entry number for the new area
LAUNCH_ACTION_FUNCTION sc#addWmpAre
    INT_VAR mapIcon = 10           // map icon
            xCoord  = 864          // x coordinate
            yCoord  = 428         // y coordinate
            tTime   = 2            // travel time *4, so two means eight hours
            inclSv  = 1

    STR_VAR areName = "ARC012"     // area reference, like "AR0700"
            strName = "East Wood of Sharp Teeth" // area name, like "Waukeen's Promenade"
            strDesc = "East Wood of Sharp Teeth" // area description which will show up when hovering the area on the worldmap

END

Her lips were red, her looks were free
Her locks were as yellow as gold
Her skin was white as leprosy.
The Nightmare Life-in-Death was she,
Who thicks man's blood with cold.

Samuel Taylor Coleridge

http://teambg.net
The Undying