Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Do anything (a technical demonstration mod)

chimericchimeric Member Posts: 1,163
~"I always knew steam could blow!"

Some guy, to James Watt~


This is a technical demonstration mod, a mod for modders. There is no gameplay here. I show you previously unexplored functions of the Infinity Engine, and if "Do anything" is an overshot, it is not by far. You will be able to:

- Play the game (BGEE and probably BG2EE) without a protagonist or with any creature as the protagonist, including a monster or one of the NPC

- Copy any creature any number of times and include clones in the party

- Force any creature to join the party, with the ability to gain experience and levels

The screenshots are an illustration and the files in the mod (added on top of your Override folder) let you experiment with this magic on your own.

The functions are highly experimental and just discovered - but they do work.

Download

Attention!


No protagonist


Joining the party


Ogre Mage character screen


Ogre Mage magic


Ogre Mage inventory


A party of Edwins and Dorns


Clone rampage

Comments

  • AquadrizztAquadrizzt Member Posts: 958
    Is the 3rd function (force join) any different than say... Control Q?

    And what happens when the game checks for Player1 after you've removed the protagonist?

    LavaDelVortel
  • subtledoctorsubtledoctor Member Posts: 11,469
    "Do anything" doesn't... do anything. How about making an actual mod with this stuff? Should be easy for someone who thinks so highly of their own imagination and skills.

    "Do anything?" How about: do something.

    LavaDelVortelJuliusBorisovAquadrizztCrevsDaak
  • chimericchimeric Member Posts: 1,163
    edited December 2016
    If you mean whether making a creature join is different from dominating it, then yes. A dominated creature is a puppet, not a real party member. You can use its abilities but not access its stats, inventory and so on, whereas a creature that actually joins starts to earn XP, you can equip it, give it scripts, it takes up a Player1-Player6 slot as far as the engine is concerned and so on. It becomes one of the NPC.

    You could have a Carrion Crawler fighter/mage. :D

    Player1 is nothing special. This object's presence only matters for scripts that specially call on it, there are a few. Anything that separates the main character, instant kills from NPC and so on. Those scripts won't work until you have taken it another creature to fill the vacancy.

  • LavaDelVortelLavaDelVortel Member Posts: 1,397
    It all seems a bit... pointless. Like really.

    KuronaCrevsDaak
  • KuronaKurona Member Posts: 881
    JoinParty() is a script action present and documented by the IESDP since long before the EE. You, uh, might want to do a little research before claiming you discovered some kind of revolutionary opcode.

  • LavaDelVortelLavaDelVortel Member Posts: 1,397
    ...and the relationships... if any creature may become player1 - let's say Dorn becomes one - he will make for example romance checks for his own stats, gender and will talk to himself... <3 We know he's in love with power, but the images of him kissing himself... Ah, Dorn, who else knows better how to make love to you if not yourself!

    CrevsDaakGrammarsalad
  • chimericchimeric Member Posts: 1,163
    Watt, bring Gutenberg with you. Maybe people need to be reminded how to read as well.

    Naturally, all of these possibilities that I explain here will be useful if applied with intelligence and to a purpose. There is no reason to go around making any passerby creatures join your party, although now you can. But there may be plenty of reasons to making an NPC Ogre Mage, ghoul or, say, hobgoblin, turning them into Player1 in the start of the game so that it plays very differently, or in the middle if it suits your plot, and so on.

    I won't waste any more words on the usual fearful nay-sayers, who, I realized much too late, will inevitably make up the majority of people anywhere. Instead, for the minority that is inspired by discoveries, here are a few things about these functions I found out in the last few days.
    • It is possible to use ActionOverride(Player1,SetName("string")) to change the name of a substitute for Player1. Try to come up with a way to copy that name from the original protagonist object.

    • Cloning hostile creatures makes the clones die instantly. Perhaps this can be countered.

    • Clones are copied with local variables and states, even if they come without equipment, as when a clone is cloned again. If you copy the original for the second time instead of the clone, then equipment will be copied.

    • All clones have the COPY script name. I wonder if it's possible to change this within the game? This, by the way, matters if you decide to replace an original with a clone: creatures are referred to by their script names for special NPC dialogues and things like romances, so without a way to change the script name those references will fail. You may be able to make creative use of that just because a clone is not the original (remember that Farscape episode where Crighton got split in two?), or be open to the fact that those mods will have to be sacrificed, and tell people as much. No one has said all things must be compatible.
    Still, I wonder if dialogues may not be edited en masse with Weidu to replace a definite script name reference, like "edwin", with a reference to a creature in a custom spell state. In this case it would be, say, EDWIN_CUSTOM, cast on him permanently on creation. We could write a custom state for every NPC. Perhaps this can be an OR(2) condition for either "edwin" or anyone in the EDWIN_CUSTOM state.

  • chimericchimeric Member Posts: 1,163
    edited December 2016
    The problem with copying creatures with Project Image, that they all have the COPY script name, is not there if you use a script action instead: CreateCreatureObjectCopy(S:ResRef*,O:Object*,I:Usage1*,I:Usage2*,I:Usage3*)

    So this is a different road - cloning by script. The guide doesn't say what the numbers in the end mean, but I just used CreateCreatureObjectCopy("edwin","edwin",1,2,3) and I now have two creatures with the EDWIN script name in the party. Just two Edwins, for short. Maybe I should simply spawn Edwin without this copy bit.

    The problem that now arises is that I still get the object stored in the game - the 1st-level Edwin. I still want a copy of the current Edwin. I'm thinking of using MakeGlobalOverride() on Edwin before he clones himself to imprint the current version on the game's mind. Further clones and clones of clones will then follow this chain of commands: make themselves global, create a copy of themselves with an override script that has a Heard condition, do a global shout, then rely on the next-generation clone to use ActionOverride on LastHeardBy to TakeCreatureItems from itself (they very nicely land in all of the right slots, too - if only I can get them droppable), and finally DestroySelf.

    Kind of a like a relay race. Yell, pass the baton and, well, die.

    MakeGlobalOverride doesn't transfer to the next time playthrough, does it?

    Post edited by chimeric on
Sign In or Register to comment.