Aller au contenu

Photo

PRCSCR vs. Module Script for adding items to the game


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Rolenka

Rolenka
  • Members
  • 2 257 messages
Looking around it seems like the preferred way to add an item in the player's inventory (like Bioware's DLC promo items) is with a module core script that checks for event type, checks/creates the item if it's MODULE_LOAD, then passes all other events on.

If I correctly understand how module scripts work that means every time any event at all fires during the game, it has to check with this script before moving on. That sounds like a lot of unnecessary processes.

Wouldn't it be better to use a PRCSCR that runs at loading into any area? Then you're only running a script every time you load an area, rather than every time something (anything) happens.

I find it highly unlikely that I'm somehow the first person to think of this and I'm smarter than everybody. I'd just like to understand where I'm wrong. Image IPB

#2
Eshme

Eshme
  • Members
  • 756 messages
I thought Bioware uses PRCSCr ? At least with what is their free giveaway stuff rings etc. I dont have any DLC thou, i can just tell about the free stuff where ive seen it.

#3
Rolenka

Rolenka
  • Members
  • 2 257 messages
My belief was that nobody knows how Bioware does it, because the DLC can't be examined. I tried a little bit and could find no clues. I didn't see a GDA file; I could be mistaken.

But the posts I've read here after searching and this guide all say to use a module core script.

#4
Eshme

Eshme
  • Members
  • 756 messages
I have that "dao_prc_promo_edg" and so. And i can open this, can you not? I think PRCRSC can be used when you change someting in the Singleplayer, like adding items, or adding quests. I use it when i added my tent to the camp.

#5
Rolenka

Rolenka
  • Members
  • 2 257 messages
Aha! I checked again (using your "Edge" example) and found a PRCSCR GDA file for any area pointing to prm000_add_edge.ncs. (too bad there's no way to see what's in the ncs file).

There's also a plot file in there called plt_prm000_pt_state_edge.plo with a flag name of PRM_PLAYER_RECEIVED_EDGE.

I haven't really explored how plot files work, but it seems obvious Bioware uses a plot flag to determine whether or not to create the item rather than IsObjectValid (as in the previously linked guide).