Jump to content

Move_to_new_town bug


Recommended Posts

In my scenario, I have a dungeon, and it currently has two floors. I didn't know how to do stairs to a new floor, so I opened The Valley of Dying things in the editor. I found out how Jeff did it in the School of Magery, and I used the same call:

Code:
void move_to_new_town (short new_town,short loc_x,short loc_y)

I put in the coordinates for where the stairs take you in the new town, but no matter what I do, the party ends up in a completely different place! How can I fix that?

Link to comment
Share on other sites

How completely different is the placement? Is it on the other side of town (this would be bad) or is it just off be a few squares (this is to be expected). Keep in mind that in general you're moving a party of ~4 characters which all have to be placed, so the game takes some liberties with arranging them around the single set of coordinates you give it.

 

EDIT: Forgot to mention that, yes, that is certainly the right call to use for such a purpose.

Link to comment
Share on other sites

Make sure there's a sufficiently large empty area for the party to appear in, preferably at least 6 spaces long and 4 spaces wide. The game really doesn't like placing the party in narrow corridors, and it can sometimes freak out and put them somewhere quite some distance away from where you wanted.

Link to comment
Share on other sites

Okay, so the party appears all the way on the other side of the town, on Blackness. They could not move from where they were placed. I made sure there was room and that it fit Thuryl's measurements, and I most definitely did not switch x and y. I made sure the starting location, and all of the town entrances were at where I wanted the party placed, just in case, but none of this did anything. I'm just going to put the script through Alint while I'm waiting for something else to do; it helped me before.

 

Edit: Alint didn't catch anything.

 

Link to comment
Share on other sites

I'm not sure posting a screenshot or the script would help. Alint didn't catch anything in the script, and, really, what good would a screenshot do? There's enough room for the party, I triple-checked the coordinates, and I don't see what else could be wrong. I think I'm just going to give up on the stairs and condense it into one floor.

Link to comment
Share on other sites

I think damaging floors, or blocked spaces might stop the game from placing you on a certain space, but it's certainly something along these lines. The script - it need only be that chunk of code, and not the whole script - and a screenshot would help us figure this out for you.

Link to comment
Share on other sites

  • 2 weeks later...

Okay, I just gave up on my third scenario, and I've started another one. In this scenario, I used the call again. The party popped up somewhere way far off, and it wasn't even on the automap.

 

Here is a screenshot to show my meaning:

Screenshot

 

And here is the pertinent chunk of script:

Code:
beginstate 17;	move_to_new_town(2,16,17);break;

I doubt this will help, but it's more than I gave you to go on last time.

Link to comment
Share on other sites

I meant a screenshot of the main window, not the automap, but that might be enough information to go on already. Is the northern half just regular cave floor and the southern half the "solid stone" floor, or are you using custom floors? Try putting the target destination a few steps further north, away from the edge.

Link to comment
Share on other sites

Well, that is a screenshot of the main view in the editor, but in 2D (zoomed out) mode, thus the source of the confusion. I think what Thuryl means is that a screenshot from the 3D editor's 3D mode would be more useful.

 

Also, I agree that the issue may be that the game may not like trying to put the party right up against a large obstacle, like that big area of solid stone appears to be, especially if it's gotten the idea that it wants top lay the party members out in a North-South oriented line. That system is a little finicky, although I can appreciate why this happens, as I would dread having to write the code to handle that job with all its possible cases.

Link to comment
Share on other sites

While that might have been a practical solution, it would have necessitated changes to one or possibly a number of other parts of the movement and combat logic, as the way the engine stands it has some fairly serious issues with cases when multiple characters occupy the same space. Giving more thought to the problem overall would likely have helped, but as has been noted before, the project threatened to suck up more time than Jeff could really afford to throw at it.

Link to comment
Share on other sites

Ah. In that case, I strongly recommend the 3D editor, as it still has the same 2D mode you're used to, but also has a very handy pseudo-3D mode just like the game itself. If you're on a Macintosh you can grab a copy from the version I maintain, and if on Windows, I think that we haven't yet really got a release version to supercede it, so you'll want the version from Sourceforge.

Link to comment
Share on other sites

  • 2 weeks later...

*facepalm*

 

I would just like to point out that people repeatedly suggested you post part of the script, and you repeatedly refused, saying it wouldn't help. However, had you posted that one line of code, somebody would immediately have been able to point out the problem.

 

A little humility goes a long way.

Link to comment
Share on other sites

Originally Posted By: Skulduckery Pheasant
Okay, I'd just like everyone to know: I GOT IT TO WORK! (Two given up scenarios later tongue ) It turns out that for some reason, the BoA grid is upside down, and (0,0) is the top left! This explains everything!
Actually, this is standard for computers. tongue
Link to comment
Share on other sites

Quote:
I would just like to point out that people repeatedly suggested you post part of the script, and you repeatedly refused, saying it wouldn't help. However, had you posted that one line of code, somebody would immediately have been able to point out the problem.


Well, the good thing is that I fixed it. But you're right, most of my glitches are silly mistakes. But I'm learning, and they're becoming less frequent and easier to solve on my own. Hopefully I won't need any more help in the near future.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...