Infoportions

From Blood Wiki
(Difference between revisions)
Jump to: navigation, search
m
 
(4 intermediate revisions by one user not shown)
Line 6: Line 6:
 
  w1m3_crypt1button_p // button 1 was pressed in light crypt
 
  w1m3_crypt1button_p // button 1 was pressed in light crypt
  
Infoportions could be local or global. Local infoportions belongs to player/npc, while global belongs to game and being active on all players.
+
Infoportions could be local or global, can have values attached. Local infoportions belongs to player/npc, while global belongs to game and being active on all players.
 +
 
 +
== Naming conventions ==
  
 
As all infoportions share same name space, some standarts of naming should be followed to avoid collisions.  
 
As all infoportions share same name space, some standarts of naming should be followed to avoid collisions.  
Line 14: Line 16:
 
* Kain's eventual comments (snow, rain etc.) are prefixed by "comment_".
 
* Kain's eventual comments (snow, rain etc.) are prefixed by "comment_".
 
* Global infoportions always prefixed by #
 
* Global infoportions always prefixed by #
 
Infoportions can have values attached.
 
  
 
== Usage ==
 
== Usage ==
Line 45: Line 45:
 
* etc.
 
* etc.
  
Typical usage on infoportions for level design:
+
Typical usage of infoportions for level design:
* When having same NPC in two maps (like barkeep in Ziegsturhl tavern), when one is killed, another should be removed too.
+
* In some maps, there is two or moreentities representing same NPC (like barkeep in Ziegsturhl tavern), when one is killed, another ones should be removed too.
 
* Open doors, activate stuff in another levels.
 
* Open doors, activate stuff in another levels.
 
* Spawn more enemies when kain kills someone.
 
* Spawn more enemies when kain kills someone.
Line 52: Line 52:
 
== See also ==
 
== See also ==
 
* [[Blood Omnicide Game stats]]
 
* [[Blood Omnicide Game stats]]
* [[Zone event]]
 

Latest revision as of 14:34, 22 November 2012

Pieces of information (strings) storing player's (or game) progress, achievements and game stats. Used to identify if player performed some action (touched some trigger, killed monster, activated batmark, checked out monologue mark etc.).

Example player infoportions array:

comment_sun // sun monologue (in the light of the sun i have no comfort...) was executed
comment_rain // rain monologue was executed
w1m3_crypt1button_p // button 1 was pressed in light crypt

Infoportions could be local or global, can have values attached. Local infoportions belongs to player/npc, while global belongs to game and being active on all players.

[edit] Naming conventions

As all infoportions share same name space, some standarts of naming should be followed to avoid collisions.

  • Inventory-related infoportions are prefixed by "inv_"
  • Level-related and level-interaction infoportions set by level designer are prefixed by the worldnum and mapnum they are targeted to (w1m1_, w1m4_ etc.)
  • Kain's eventual comments (snow, rain etc.) are prefixed by "comment_".
  • Global infoportions always prefixed by #

[edit] Usage

For level designer, generic way to access infoportions is Trigger event and Pattern script. Trigger event allows to add new infoportions or values (in the form of counters). Pattern scripts allows to check for any infoportions (including gamecode-related, such as gamestats).

To make life easier, it is useful to name all infoportions using this rule:

mapname_objectname_eventhappened

Typical mapnames:

  • w1m1
  • w1m2
  • etc

Typical objectnames:

  • button1
  • secretbutton
  • barkeep
  • brigands
  • etc.

Typical events:

  • k - killed
  • a - activated
  • p - pressed
  • o - opened
  • c - closed
  • etc.

Typical usage of infoportions for level design:

  • In some maps, there is two or moreentities representing same NPC (like barkeep in Ziegsturhl tavern), when one is killed, another ones should be removed too.
  • Open doors, activate stuff in another levels.
  • Spawn more enemies when kain kills someone.

[edit] See also

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox