Jump to content

temnix

Members (r)
  • Posts

    1,472
  • Joined

  • Last visited

Posts posted by temnix

  1. I'll credit in my mod anyone who can tell me how to use Weidu to go through every area, look at all of the doors and containers, however many there happen to be, and if they are locked and if the "Key" field is empty patch this field and the "Locked message" field with resource and string references. This is to make them accept keys, but it requires knowledge of Weidu beyond what I have.

  2. And what would be the offset here, hmm? I could patch creatures with this, but that's different from adding items - that function puts items wherever. For patching the offset would be different for every creature, depending on file size, number of items, effects, spells etc. But it's all right, I don't need this any more. This item is a shield and equipped, so it's unstealable as it is.

  3. The ADD_CRE_ITEM function only allows one flag in the end. A couple are combination, but what I need is an item that is both unstealable and stolen. I'm going to rewrite the string for "I don't accept fenced goods" to refer more generally to black market, illegal stuff. In the case of this item the party will have to kill the NPC to get it, and then the item is to be marked as impossible to sell to anyone but a dealer. So I need both of those flags. Possible?

  4. I have a spell which is not supposed to work on creatures with any amount of resistance to cold. On top of those effects sits Protection from spell, opcode 318, but I need to add a custom line for protection from cold (stat 15) > 0. I try this code but get wrong results:

    COPY_EXISTING    ~SPLPROT.2DA~    override    COUNT_2DA_ROWS 4 newrow BUT_ONLY
    APPEND ~SPLPROT.2DA~ ~%newrow% 15 0 3~ OUTER_SET newrow = newrow + 1

    Weidu is not my specialty. Either I'm doing something wrong here or a bit of code higher up in the tp2 is to blame. It is used for another spell and reads:

    COPY_EXISTING    ~SPLPROT.2DA~    override    COUNT_2DA_ROWS 4 row    BUT_ONLY
    APPEND ~SPLPROT.2DA~ ~%row% 15 50 2~    OUTER_SET    one = row + 1
    APPEND ~SPLPROT.2DA~ ~%one% 15 127 3~    OUTER_SET    two = one + 1
    APPEND ~SPLPROT.2DA~ ~%two% 260 %row% %one%~

    I don't know why this code would cause problems for what goes below, but the spell in question instead of a new row gets pointed to the created "cold resistance > 127." Help would be appreciated. I'll credit you in the mod this is for when it comes out.

  5. I want to call on the people here who know more about timers and variables than I do. What I need is some kind of "moving measure of time" which it would be possible to get ahead of or behind with AdvanceTime(). This gets complicated, so let me explain, for contrast, what I hoped for from local timers and variables. I thought that I could set a local timer and that the corresponding local variable would "tick-tack" quietly and increment until it matched the set value, like a time bomb, and then the timer would resolve itself. If so, I could then use AdvanceTime() to go ahead in the game engine's "timeline," its counting of ticks, to the point when this resolution happens or beyond, and the timer would resolve immediately. And this can be done (though not for the reasons I thought). But I also believed that I could use AdvanceTime() with a negative value to travel back along this accruing local to when it was 0 and so unset the variable and return the timer to the never-set state, where it could be detected with !GlobalTimerNotExpired, or at least have a "live" variable that would be bigger in the future, smaller in the past. And if I could push this "live" variable far back enough by going back in time deep enough, I would get it to 0 or even a negative value.

    I was wrong. Variables of timers aren't "live" and incrementing this way. They are more like fish hooks thrown far ahead to some predetermined point, and though it's possible to go forward in time and make the timers trigger right away or back in time and put distance before that moment, there is no way to return to the moment when the variable was anything but what it has been set to. I can set it to 0 by hand, but I wouldn't know when.

    So what I'm looking for now is this incrementing and, for going back, decrementing, "live" measure - I guess it must be the engine time as such. I want to have a measure of it so that I know how far back to go. But I don't see any triggers for game time... And if you want to know what I need it for, I'll tell you. The scenario is this: a creature has died, and mechanisms have been put in to resurrect it when a PC comes in marked as a time traveler (with a global variable). The party casts the time travel spell, activating a negative AdvanceTime(), rewinding the clock with everything that entails, and the time traveler global is set. With this flag hoisted the dead know that it is the past and they are supposed to be still alive, and the mechanisms to resurrect them do their job. The problem, and the only part I don't have working yet, is that the resurrection doesn't know when to stop. This being the past already, whenever the creatures are killed again, they will right away be revived - and so on forever. What should happen instead is that for every time trip creatures get un-died once.

    I can remove the resurrection mechanisms after they do their job, and that will make the wonder once-only, but then the creatures will be permanently dead and will not rise again when and if the PC comes to them from the future a second time. I can also set the time traveler global to 0 when this resurrecting happens, lower the flag, but then creatures dead in other areas will not know what to look for. The crux of the issue, as they say, is that in whatever way I mark the dead ones so that they stop rising for this trip, that mark is permanent. Since time travel in this engine is only a simulation, the marks never go away, and I can't go back to before I left them using AdvanceTime(), which is what I hoped for from local variables and timers. If a timer has been set, then it is set, and if it has resolved, that's also recorded. Maktub, as Muslims say. But if I can latch on to something that is not fixed but actually moving, the sliding silky ribbon of engine time itself, what I can indeed send this way and that with AdvanceTime(), only I don't know how to ask and tell what game time is it/it is - then I can put events uniquely in their moments and return to those moments.

  6. If you want to know where the problem is, you have to break the process down, step by step. This looks like a mod you are making just for yourself, so the most advice I want to give is to implement the features one step at a time: give them gold; if that works, put them in the Promenade...

  7. It's time for an update of this topic. From what I understand, a global and a global timer are the same thing, only with the timer its value continues to increase - with time. But what if time reversed its course? It can do that with AdvanceTime() to something negative. If the jump back is long enough, is it is possible to arrive at a point where the timer has not yet run? Where (when) the value of the timer, and of the global, is 0 or less than 0? Is the timer considered to have started then already or not? Is it going to respond to both NotExpired and GlobalLT(1)? And if it is possible to go back to GlobalLT(1) with this application of AdvanceTime, then is that also possible for the "LOCALS" scope?

  8. Instead of giving item files, which are probably all right, if you can type the items in with the console in-game and equip them directly (that's what you mean by "give", right?) - instead of that you should describe how you are going about this in Weidu. And whether there are any WARNINGs in the log file generated by your installer.

  9. I have a situation in my mod where ALL of the effects on characters should be removed - or as many as possible. How should I go about this? If I apply Dispel, it will not remove effects with Power 0. The only other method would be Remove effects by opcode for every opcode there is, but that's crazy. How about Modify effect duration? Can that be configured to shrink down all ongoing durations to zero?

  10. Is it possible to keep them going there? The VVC has a check for "Persist through time stop," but that just helps retain the color. Effects don't run, though, even with "Immunity to time stop" on. What I actually need is just the gray overlay as the background for them, the rest of time stop doesn't matter.

  11. A torch had better be a light source! Though maybe the smoke needn't be. But that just controls coloring, whether they retain their own at night and indoors or not. The light spot is really what gives the engine the willies. When it comes on top of another, the game has a hard time drawing the result, it looks like.

  12. I'm looking for a way to implement light - with a mechanic that would respond to a dark environment. There are two types of dark situations: everywhere at night and indoors always. Rooms have nights, too, of course, though they shouldn't matter there. Now, with the Cast spell on condition effect it is possible to make an item, spell or ability that triggers at a certain time. DAWN and DUSK only trigger once, at those exact moments when the sun of Toril rises and sets, if you are up to hear the rooster and... whipporwill, I suppose, but NIGHT comes in right after DUSK and triggers every round until dawn very nicely. But what to do about interiors? I could check for area type with !WEATHER, but where to put these checks? The only idea I have is to patch the scripts of indoor areas to apply a temporary combination of spell states to the party round after round, all the time they spend there, and then the items, e.g. torches, could apply benefits to the characters in those spell states. And outside the same would happen at night. But this is very clumsy and would have to happen a lot of the time. I'm open to better solutions.

    This is a practical question, because I've just finished making torches. And though I made them give some protective benefits around the clock, I don't know how to make them apply indoors always and not apply outdoors when the sun shines. I can't say I've heard many bright ideas on these forums whenever I've asked, but let me cast the net one more time...

  13. No, the default is on for me. I just hope more or less modern computers won't experience this. One problem that always comes up at my level of performance is overlapping "Special lighting" in VVCs. As soon as a few effects with them come together, the game virtually stops. Does anybody know how to avoid this, what to tweak, perhaps?

  14. Sometimes, when there are many visual effects playing at once, from items for example, superimposed, with lighting and more, my game convulses and switches them all off. They come on again in a second, nothing crashes or stops, but these blackouts surprise me. It is as if the overburdened engine is gasping for air. But my computer is quite old. Does this happen on anyone else's machine?

    a699a48216b83496e1dd9a0aa96f75b7.jpg

×
×
  • Create New...