TMC wrote:Whoa, slow down. Lifting the 300 NPC limit won't be hard, just need to replace one simple file format with another. Could be less work than scripting an elaborate workaround like that (which is frequently the case. Wouldn't it be nice f users could implement their own features?
I'm not sure I follow you. How would I do this?
Spoonweaver wrote:if sounds like you'd be better off faking the map being continuous then you would faking hundreds of npcs.
With the fade taken out of doors it shouldn't be too hard.
Pokemon fakes 1 big map with a bunch of smaller ones seemlessly connected.
Explain this in more detail. Even if the doors didn't fade, the screen still wouldn't scroll. What was your plan?
Mogri wrote:Watch out for performance issues. It might not be as big an issue as it was in the day, but Scary Game 2's town map got a lot of lag when it was released.
I'm on a really old PC so I'll be the first to notice if there is a huge performance problem.
Willy Elektrix wrote:I'm not sure I follow you. How would I do this?
I meant that it could be added in the next version, not necessarily by you.
Willy Elektrix wrote:
Explain this in more detail. Even if the doors didn't fade, the screen still wouldn't scroll. What was your plan?
You would have to place the doors away from the edges of the maps, leaving at least half a screen's distance so that the camera keeps scrolling.
Mogri wrote:Watch out for performance issues. It might not be as big an issue as it was in the day, but Scary Game 2's town map got a lot of lag when it was released.
Things got far far faster when we moved from 16 bit QuickBasic to 32 bit FreeBASIC. I haven't tried it, but I think that 300 NPCs wouldn't be much of a problem now, even on hardware from 2000.
plotscript, count NPCs by ID, begin
variable(ID, total)
for(ID, 0, 500) do(
total += NPC copy count(ID)
)
show value(total)
end
plotscript, count NPCs by reference, begin
variable(ref, total)
for(ref, -1, -300, -1) do(
if(get NPC ID(ref) >= 0) then(
total += 1
)
)
end
I don't have any recommendations about which of those two methods to use-- they should both work equally well. I just provided both of them because it might be helpful for understanding how NPC ID numbers and NPC references work
One thing to remember about both of these methods is that they will only count currently visible NPCs. If an NPC is hidden by a tag, or is an already-used one-time-use NPC then it will not be included in the count.
Oh, actually raising the NPC limit isn't as straightforward as I thought, as evidenced by the second script that James posted. I wrote some thoughts about that on the wiki.
Anyway, to provide an alternative answer to Willy's question, which was aimed at the map editor, I think the easiest way to accurately check the number of NPCs is actually to use the in-game NPC debugger (Ctrl+F11). It will show the reference number of each NPC on the map. So look at the reference number the last NPC that you placed in the map editor. Note that NPCs created with "create npc" get assigned reference numbers going from -300 (displayed as 300) up (down), while ones places in Custom go from -1 down (up). And that if you remove an NPC there will be a gap in the numbers.
Another question. Is there an easy way to dump of all my text boxes to a text file? The reason I ask is because it would be much easier for me to proofread and edit them this way. However, I do not need to import them back into OHR.
Willy Elektrix wrote:Another question. Is there an easy way to dump of all my text boxes to a text file? The reason I ask is because it would be much easier for me to proofread and edit them this way. However, I do not need to import them back into OHR.
I am pleased to say, this is indeed possible, and rather easy! Just look in the text box editor for "Export text boxes"
Tell me if this is possible. I want to write an on-step script that reads what zone the PC is currently in and then randomly displays thematic text boxes based on this zone.
I'm pretty sure it could be done and I think I can figure out how. However, I'm not at a good point in development to begin experimenting with it. So for now I just want to make sure it is possible.