Jump to content


Photo

Near Infinity, Replacing Creatures in Spawn Scripts.


  • Please log in to reply
4 replies to this topic

#1 Demtrek

Demtrek
  • Member
  • 64 posts

Posted 03 June 2017 - 10:16 AM

So in some past questions I have learned and mastered creating new creatures and renaming them using the "create copy" function in Near Infinity.

 

Now that I have a pallet of creatures I thought replacing them in scripts would be as simple as earasing the name and replacing it with the new creature script name.

 

THEN
    RESPONSE #100
        SetGlobal("BanditSpawn","GLOBAL",1)
        CreateCreature("BANDIC",[4354.2466],0) // Deke
        CreateCreature("BANDCAP",[4278.2608],0) // Bandit
        CreateCreature("BANDCAP",[4207.2585],0) // Bandit
        CreateCreature("BANDCAP",[4149.2498],0) // Bandit
        CreateCreature("BANDCAP",[4421.2472],0) // Bandit
        CreateCreature("BANDCAP",[4417.2605],0) // Bandit
END

 

 

Above is just a copy/paste....I attempted to replace "BANDCAP" with "NEWXXXXX".  When I compile I get errors.  The only thing I noticed was the original "BANDCAP" has ........... *Dots* underlining the name in the script, but when I copy and paste from the override section it doesnt.

 

 

Is replacing static or spawn creatures possible using NI?



#2 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 03 June 2017 - 10:34 AM

Missing "dots" may indicate that the CRE resource has either not been found or not yet been cached internally by NI. Make sure they are located in the override folder with the right extension. If you created the CRE files in the same NI session you should either reload the resource tree (menu Game > Refresh Tree), or quit and restart NI.
 



#3 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 03 June 2017 - 10:37 AM

So in some past questions I have learned and mastered creating new creatures and renaming them using the "create copy" function in Near Infinity.

 

Now that I have a pallet of creatures I thought replacing them in scripts would be as simple as earasing the name and replacing it with the new creature script name.

 

THEN
    RESPONSE #100
        SetGlobal("BanditSpawn","GLOBAL",1)
        CreateCreature("BANDIC",[4354.2466],0) // Deke
        CreateCreature("BANDCAP",[4278.2608],0) // Bandit
        CreateCreature("BANDCAP",[4207.2585],0) // Bandit
        CreateCreature("BANDCAP",[4149.2498],0) // Bandit
        CreateCreature("BANDCAP",[4421.2472],0) // Bandit
        CreateCreature("BANDCAP",[4417.2605],0) // Bandit
END

 

 

Above is just a copy/paste....I attempted to replace "BANDCAP" with "NEWXXXXX".  When I compile I get errors.  The only thing I noticed was the original "BANDCAP" has ........... *Dots* underlining the name in the script, but when I copy and paste from the override section it doesnt.

 

 

Is replacing static or spawn creatures possible using NI?

Yes it is - but try Argent77's proposal first and then let us see if there is still a problem.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#4 temnix

temnix
  • Member
  • 983 posts

Posted 03 June 2017 - 11:31 AM

I'm using an imperfect solution for replacing some creatures spawned in an area. They are normally xvarts, XVART.CRE, and replacing them inside spawns was just a matter of WRITE_ASCII with Weidu. The ARE file has all the offsets. I needed my own, custom xvarts, also starting out hostile but calming down once the party has made peace with the chieftain. They were scripted to go neutral then. The reason I call this an imperfect solution is that even now when peace has been made the spawns still produce the same creatures, who appear red. They turn neutral in a second or two, reacting to the status quo, but the combat music may still kick in or they may move to attack before standing down. Don't know what to do about that. I mean, they either begin as neutrals or they begin as enemies, there's no having your cake and eating it too, is there?


Edited by temnix, 03 June 2017 - 11:32 AM.


#5 Demtrek

Demtrek
  • Member
  • 64 posts

Posted 04 June 2017 - 08:56 AM

Missing "dots" may indicate that the CRE resource has either not been found or not yet been cached internally by NI. Make sure they are located in the override folder with the right extension. If you created the CRE files in the same NI session you should either reload the resource tree (menu Game > Refresh Tree), or quit and restart NI.
 

We have a winner!!   Yes I was using some creatures I just made.  Today I got my dots when I tried again.  Thank you.