If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Plants vs. Zombies 2: It's About Time/Developer Documentations

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Plants vs. Zombies 2: It's About Time.

#  ==================    Zombie First Wave   =====================
			First wave is the first wave that this zombie appears in when	
			picked for a wave spawn. This is important because we don't		
			want the hardest zombie spawning in on the very first wave		
			when the player isn't ready. Typical numbers used in PvZ were	
			1, 5, 10, 15, and 20											
			=============================================================== 
#  ================    Zombie First Level   ====================== 
			First level that the zombie appears on. This should match the	
			levels.xml file for the first time the zombie appears.			
			=============================================================== 
#  ==============    Zombie Wave Point Cost   ==================== 
			Wave point cost is how many points this zombie is worth when	
			the wave is being built. Example, if the wave will consist of	
			only 20 points, and this zombie is worth 5 points, the wave		
			might randomly pick this zombie 4 times (for a total of 20		
			points) and this wave would only be made up of 4 zombies. If	
			there are 4 points left to be picked on the wave and this		
			zombie is worth 5 points, it will be skipped because the wave	
			doesn't have enough points to buy it.							
			=============================================================== 
#  ==================    Zombie Weight   ========================= 
		 	Weight of the zombie is the odds that it will be picked and		
		 	wave points spent on it. The larger the weight, the more		
		 	likely to be picked. A value of 0 means it is never picked		
		 	(but spawned via special circumstances, like the old backup		
		 	dancers, the flag carrier, or the old boss). A value of 1 is	
		 	super rare, like the yeti. Values from PvZ1 were 1000, 1500,	
		 	2000, 3000, 3500, 4000											
			=============================================================== 
# Zombie Template - copy+paste me!!
Hmmm...
To do:
Double check the formatting.
######################################################################
		
			Name				 Data Type   Default   Description
			===================================================================================================
			Class				- (string) - UIWidget	Class to spawn when the property sheet is loaded.
 
			Parent				- (string) - null       Parent UIWidget to attach to
 
			ParentAnchor		- (string) - TopLeft    Location on parent we anchor to. Values:
			[TopLeft, Top, TopRight, Left, Center, Right, BottomLeft, Bottom, BottomRight]
 
			Anchor				- (string) - TopLeft    Location on parent we anchor to. Values:
			[TopLeft, Top, TopRight, Left, Center, Right, BottomLeft, Bottom, BottomRight]
 
			ResourceGroup		- (string) - null       Resource group name that has our art resources
 
			Width				- (uint16) - 0          Set the SCREEN width of the widget. Values:
														0		: Auto-fit to the max size it can be in regards to all widgets
														> 0		: Size to use
 
			Height				- (uint16)  - 0          Set the SCREEN height of the widget. Values:
														0		: Auto-fit to the max size it can be in regards to all widgets
														> 0		: Size to use

			VirtualWidth		- (uint16) - 0          Set the virtual width of the widget (will be SCALED to the SCREEN with UI_S). Values:
														0		: Auto-fit to the max size it can be in regards to all widgets
														> 0		: Size to use
 
			VirtualHeight		- (uint16)  - 0         Set the virtual height of the widget (will be SCALED to the SCREEN with UI_S). Values:
														0		: Auto-fit to the max size it can be in regards to all widgets
														> 0		: Size to use
 
			SizeFromImage		- (string) - null       Sets the width and height of the widget based upon the size of the specified image.
 
			SizeFromScreen		- (bool)   - false      Sets the width and height of the widget based upon the size of the device screen.
 
			WidthFromImage		- (string) - null       Sets the width of the widget based upon the size of the specified image.
 
			HeightFromImage		- (string) - null       Sets the height of the widget based upon the size of the specified image.
 
			InputPriority		- (int8)   - 0          Specify the priority that the widget receives mouse input. Values:
														0      : Receives no Input
														1 - 4  : Lower numbers have higher priority
 
			VirtualHitInsets	- (array)				Specify the virtual insets for the hit detection (will be SCALED to the SCREEN with UI_S).
					mLeft		- (int16)  - 0			left inset
					mTop		- (int16)  - 0			top inset
					mRight		- (int16)  - 0			right inset
					mBottom		- (int16)  - 0			bottom inset
	 
			PositionOffset		- (array)				Location offset from our anchor location. NOTE: This is assumed to be in SCREEN SPACE. If you want it scaled, set ScalePositionOffset
					x			- (int)	   - 0			x offset
					y			- (int)	   - 0			y offset

			ScalePositionOffset	- (bool)   - false      Specify if we scale the position offset with the UI_S macro
 
			RenderOrder			- (int16)  - 0			Render order of the widget, lower numbers are drawn first.
 
			######################################################################

A note on the UI layout.

none, ground_zombies, off_ground_zombies, dying_zombies, griditems, plants, ground, all_zombies, everything
none, bypass_shield, hits_shield_and_body, hits_only_shield, lightning, no_flash, doesnt_leave_body, fire, rolling, lobbed, shooter
 'shooter' and 'catapult' should be mutually exclusive.  'lobbed' and 'shooter' can coexist, or not.  'catapult' should be a strict subset of 'lobbed'.
 See bloomerang (lobbed, shooter), banana (lobbed only), cabbagepult (lobbed, catapult), and peashooter (shooter only) for examples.
This ImpactOffset affects both the particle and the PAM
Projectile is a shooter but damage is explosive, so no shooter flag
Pick a location in the FLA, scale by -1/2,
To pick values for CollisionRect start by identifying a collision rect in the FLA file.,
Then mX, mY = the vector to the top left of the rect from your pivot point (= AttachedPAMOffset * -2) scaled by 1/2,
Then mWidth, mHeight = the width and height of the rect scaled by half

A note on the animation format.

Not a shooter projectile (so will hit excavator holding shovel) by design request)
Technically a shooter but damage is gaseous so not using shooter tag
RTFM: https://confluence.internal.popcap.com/display/PlantsVsZombies/Startup+Config

A note in the startup configuration file, telling developers to refer to a internal confluence page.