Re: Of Gods And Mortals

Status
Not open for further replies.
That's the basic idea matey. As long as there's water under the keel she'll float. :yes

How are you moving it from point A to point B?

What you could do is check a certain distance ahead for the water depth. If it's good, go there. If there's land then check of at an angle to either side for water (I think that can be done). When that is found go there. Just keep repeating that until it get's to point B.
 
Well it may take a little remake of the thing but generally it just moves on click to the position that the player clicks on the map. The ship will take that positions input and keep moving until it reaches the radius of that position before clearing its queue.

Basically, left click here and it moves here, when it gets there it will stop and the script starts over until the ship is deselected.
 
In that case it would be easier to impliment. If these's no water under the keel, just stop. The player will then need to choose a new spot to go to.

I'm a bit curious about this. So if you would like me to take a look into it, post or PM me the script which controls the ship.
 
Code:
// Shoreline Positions - Add points from your landscape which define where ships can load/unload platoons. (X, Y, Z)

//Shoreline Position 1
global ShoreLinePosition1

define ShorelineXPos1 = 0
define ShorelineYPos1 = 0
define ShorelineZPos1 = 0

define script CreateAShip(NewGodsTown)
define script ControlTheShip(NewShip)
define script ShipSelection(NewShip)
define script WindAffectMovement(NewShip)
define script PlatoonShipTransportSystem(NewShip, NewGodsTown)

begin script CreateAShip(NewGodsTown)
	NewShip = 0
	MarkedPos = marker at {649.48,0.00,1228.89}
start
	NewShip = create MOBILESTATIC MOBILE_STATIC_INFO_NORSESHIP at {MarkedPos}
	release NewShip
	release NewShip focus
	ALTITUDE of NewShip = get water height - (NewShip + 3.22)
	    wait 3 seconds
	disable NewShip pickup
	enable NewShip indestructible
	   wait 0.2 seconds
	  run background script ShipTutorial(NewShip)
	  run background script ControlTheShip(NewShip)
	  run background script PlatoonShipTransportSystem(NewShip, NewGodsTown)
end script CreateAShip

begin script ControlTheShip(NewShip)
	MouseClicked = variable constant from BINDABLE_ACTION_TYPE_MOVE to BINDABLE_ACTION_TYPE_ACTION
	TheHand = marker at hand position * number from 0 to 359
	TargetPos = marker at get relative position of NewShip to {NewShip}+{30,0,10}
	HandPos = marker at hand position
	LeftClicked = marker at left clicked position
	RightClicked = marker at right clicked position
	CannotNavigateHere = 0
start
 run background script ShipSelection(NewShip)
 //run background script ShipElevationAndBoundaries(NewShip)
begin loop
if ShipSelected == 1
  clear left clicked position
  clear right clicked position
	   wait 0.2 seconds
      wait until bindable action BINDABLE_ACTION_TYPE_ACTION performed
	if bindable action BINDABLE_ACTION_TYPE_ACTION performed and ShipSelected == 1
		TargetPos = marker at right clicked position
	   if not marker at right clicked position exists
  		clear left clicked position
  		clear right clicked position
		   ALTITUDE of NewShip = get water height - (NewShip + 3.22)
		   stop NewShip moving
	   else
			      wait 1.5 seconds
		while {NewShip} not near right clicked position radius 0.5
		         XANGLE of NewShip = 0.0
		         ZANGLE of NewShip = 0.0
		         ANGLE of NewShip = 0.0
		         ALTITUDE of NewShip = get water height - (NewShip + 3.22)
		         set NewShip velocity heading right clicked position speed 40.0
		end while
		   stop NewShip moving
		   ALTITUDE of NewShip = get water height - (NewShip + 3.22)
		   clear right clicked position
	   end if
	end if
elsif get object hand is over == NewShip and bindable action BINDABLE_ACTION_TYPE_ACTION performed and key KB_LCTRL down and ShipSelected != 0
   ShipSelected = 0
elsif ShipSelected == 0
// Do nothing
stop NewShip moving
else
 wait until ShipSelected != 1 or bindable action BINDABLE_ACTION_TYPE_ACTION performed
end if
end loop
end script ControlTheShip

begin script ShipSelection(NewShip)
start
begin loop
// Initial Control of a ship
   if get object hand is over == NewShip and not key KB_LCTRL down and bindable action BINDABLE_ACTION_TYPE_ACTION performed
	enable NewShip pulse speed 0.6
	  ShipSelected = 1

	  if get object hand is over == NewShip and key KB_LCTRL down and bindable action BINDABLE_ACTION_TYPE_ACTION performed and ShipSelected == 1
		disable NewShip pulse with fadetime 0.2
             ShipSelected = 0
   	  end if
   elsif get object hand is over == NewShip and key KB_LCTRL down and bindable action BINDABLE_ACTION_TYPE_ACTION performed
      disable NewShip pulse with fadetime 0.2
          ShipSelected = 0
   end if
end loop
end script ShipSelection

Thanks Kays, this is wat it looks like.
 
I see what the problem is. You made the ship indestructable. It might be more fun, err challenging, if you blew the ship up should the player decide to run it aground.  :D

The script looks a little involved and it might take me a while to get a hancle on how it woks.

 
Well, I finally got a chance to look at it and added that script to a test map and got the ship to appear. But that's all.

How do you active and move the ship. It just kinda sits there no matter what I try.

Also it looks like it's half sunk. I've tried adjust the altitute at the spawn position, but it did change it. Any ideas?
 
Its kind of tied into the tutorials script, its pretty complicated too cause there are alot of attached global variables, video files and stuff between the 2. Here is the tutorials script.

Code:
// A short tutorial explaining the use of ships as a means of transporting platoons across the ocean.
// Created by Daxter
// 16th January 2008; 8:32 AM AEST(Australian Eastern Standard Time)

global ShipTutorialComplete = 0
global SecondShipTutorialComplete = 0
global ShipSelected = 0

global ActivateSecondTutorialScroll = 0

// Tutorial 1 - Teaches you about controlling ships.
define script ShipTutorial(NewShip)

// Tutorial 2 - Teaches you about the transportation aspects of a ship.
define script ShipTutorial2(NewShip)

begin script ShipTutorial(NewShip)
	ShipTutorialScroll = 0
	CreateVideo = 0
	ShipScrollPos = marker at {615, 40, 1186}
	TargetVFX = 0
	NewShipPos = get MOBILESTATIC MOBILE_STATIC_INFO_NORSESHIP at {743, 1.25, 1186}
	HandPos = marker at hand position
start
	ShipTutorialScroll = create highlight SCRIPT_HIGHLIGHT_INFO_SCRIPT_BRONZE name "HELP_TEXT_CREATURE_CURRENT_SOURCE_09" remind "HELP_TEXT_CREATURE_CURRENT_SOURCE_09" at {ShipScrollPos}
		ALTITUDE of ShipTutorialScroll = 6.00
wait until ShipTutorialScroll left clicked or ShipTutorialScroll right clicked
	   set fade red 0 green 0 blue 0 time 2
		wait until fade ready
	begin interactive camera
		wait 3 seconds
		  set camera position to {NewShip}+{25, 15, 15}
		  set camera focus to {NewShip}+{10,10,0}
	     set fade in time 3
		wait until fade ready
	   say "Welcome to the ship control tutorial. This tutorial will cover the basics of ship control and transport uses."
		wait until read and 3 seconds or key KB_SPACE down
			clear dialogue
		wait 0.2 seconds
	   say "Times have changed recently, people have discovered the use of ships as part of their warfare or to colonize a land's islands."
		wait until read and 3 seconds or key KB_SPACE down
			clear dialogue
		wait 0.2 seconds
	   say "These ships are used by the greeks and other tribes as a means of transporting villagers and platoons across the oceans of the world."
		wait until read and 3 seconds or key KB_SPACE down
			clear dialogue
		wait 0.2 seconds
	   say "Which is why u must learn to use them. To select a ship, simply hold your hand over the ship and click the action button."
		CreateVideo = create video window with left 0.05 top 0.05 width 0.3 height 0.3 with border
		set CreateVideo clipping window left 0 top 0 width 1 height 1
			play video "ShipTutorialVideo1"
		wait until read and 3 seconds or key KB_SPACE down
			clear dialogue
		wait 0.2 seconds
			wait until not video is playing
		   stop video
		say "Now you give it a try."
			wait until read
				clear dialogue
			    wait 0.2 seconds
			wait until ShipSelected == 1
		say "Selecting ships is easy, you must now move it to the desired destination."
			wait 2 seconds and read or key KB_SPACE down
				clear dialogue
			    wait 0.2 seconds
			TargetVFX = create visual effect VISUAL_EFFECT_SCROLL_BEAM at {743, 5, 1186} time -1
		move camera position to {778, 28, 1196} time 8
		move camera focus to {NewShip} time 8
		   wait 10 seconds
		say "Here is a target for you to move the ship to."
			wait until read and 2 seconds or key KB_SPACE down
				clear dialogue
			wait 0.2 seconds
		say "With the ship selected, click the action button where the marker is and the ship will move there."
			wait until read and 2 seconds or key KB_SPACE down
				clear dialogue
			wait 0.2 seconds
		say "Do this now."
			wait until read
				clear dialogue
			wait 0.2 seconds
				wait until {NewShip} near right clicked position radius 0.1
		say "As the world expands, more and more ships will be under your control and therefore must be controlled individually"
			wait until read or key KB_SPACE down
				clear dialogue
			wait 0.2 seconds
				stop visual effect TargetVFX
		say "To deselect a ship at any time simply hold the hand over the ship and click the action button whilst holding down the Left Ctrl button on your keyboard. Do this now."
			wait until read or key KB_SPACE down
				clear dialogue
			wait 0.2 seconds
				wait until ShipSelected == 0
		say "Excellent. You have learnt all the basic functions of ship control, fundamental skills needed to influence your word across the seas. Why don't you try the next tutorial that will appear at the shoreline."
			wait until read or key KB_SPACE down
				clear dialogue
			wait 0.2 seconds
		say "A tutorial that will expand on ship control by showing you how to transport platoons."
			wait until read or key KB_SPACE down
				clear dialogue
			wait 0.2 seconds
		increment tribute by 35000
	end interactive camera
		ActivateSecondTutorialScroll = 1
		run background script ShipTutorial2(NewShip)
end script ShipTutorial

begin script ShipTutorial2(NewShip)
	ShipScrollPos2 = marker at {866.95, 30, 555.29}
	ShipTutorialOceanPos = marker at {836.98, 12, 527.94}
	PlatoonTransportScroll = 0
start
begin loop
if ActivateSecondTutorialScroll == 1
		wait until not NewShip is moving
	   ALTITUDE of NewShip = get water height
			set NewShip position to {ShipTutorialOceanPos}
		release NewShip from limbo
	PlatoonTransportScroll = create highlight SCRIPT_HIGHLIGHT_INFO_SCRIPT_BRONZE name "HELP_TEXT_CREATURE_CURRENT_SOURCE_09" remind "HELP_TEXT_CREATURE_CURRENT_SOURCE_09" at {ShipScrollPos2}
		ALTITUDE of PlatoonTransportScroll = 10
    wait until get object hand is over == PlatoonTransportScroll and bindable action BINDABLE_ACTION_TYPE_ACTION performed
	begin cinema
	     set fade in time 3
		wait until fade ready
	     ALTITUDE of NewShip = get water height - (NewShip + 3.22)
	end cinema			
	SecondShipTutorialComplete = 1
end if
end loop
    until SecondShipTutorialComplete == 1
end script ShipTutorial2

You may have also noticed the abbreviated words in there like "ALITTUDE", you probably already know but Ive created a new script for global variables that define them to abbrevs that I choose.

Code:
// A script containing shortcuts and abbreviations of constants listed in each of the enums.

// Object type constants
global constant TREE = SCRIPT_OBJECT_TYPE_TREE
global constant MOBILESTATIC = SCRIPT_OBJECT_TYPE_MOBILE_STATIC
global constant FEATURE = SCRIPT_OBJECT_TYPE_FEATURE
global constant CREATURE = SCRIPT_OBJECT_TYPE_CREATURE
global constant ABODE = SCRIPT_OBJECT_TYPE_ABODE
global constant MOBILEOBJECT = SCRIPT_OBJECT_TYPE_MOBILE_OBJECT
global constant WONDER = SCRIPT_OBJECT_TYPE_WONDER
global constant SPELLSEED = SCRIPT_OBJECT_TYPE_SPELL_SEED
global constant EMBELLISHMENT = SCRIPT_OBJECT_TYPE_EMBELLISHMENT
global constant PLATOON = SCRIPT_OBJECT_TYPE_PLATOON

// Creature constants
global constant COW = CREATURE_TYPE_COW
global constant APE = CREATURE_TYPE_APE
global constant LION = CREATURE_TYPE_LION
global constant WOLF = CREATURE_TYPE_WOLF

// Epic Constants
global constant VOLCANOEPIC = EPIC_WONDER_NUMBER_VOLCANO
global constant EARTHQUAKEEPIC = EPIC_WONDER_NUMBER_EARTHQUAKE
global constant HURRICANEEPIC = EPIC_WONDER_NUMBER_HURRICANE
global constant SIRENEPIC = EPIC_WONDER_NUMBER_SIREN

// Object properties
global constant OBJECTALIGNMENT = SCRIPT_OBJECT_PROPERTY_TYPE_ALIGNMENT
global constant ANGLE = SCRIPT_OBJECT_PROPERTY_TYPE_ANGLE
global constant XANGLE = SCRIPT_OBJECT_PROPERTY_TYPE_XANGLE
global constant ZANGLE = SCRIPT_OBJECT_PROPERTY_TYPE_ZANGLE
global constant PERCENTBUILT = SCRIPT_OBJECT_PROPERTY_TYPE_BUILT_PERCENTAGE
global constant HEALTH = SCRIPT_OBJECT_PROPERTY_TYPE_HEALTH
global constant XPOS = SCRIPT_OBJECT_PROPERTY_TYPE_XPOS
global constant ALTITUDE = SCRIPT_OBJECT_PROPERTY_TYPE_YPOS
global constant MOVING = SCRIPT_OBJECT_PROPERTY_TYPE_MOVING
global constant HELD = SCRIPT_OBJECT_PROPERTY_TYPE_IN_HAND
global constant CHARGE = SCRIPT_OBJECT_PROPERTY_TYPE_CHARGE
global constant SPEED = SCRIPT_OBJECT_PROPERTY_TYPE_SPEED

// Tree constants
global constant SPRUCE = TREE_INFO_SPRUCE
global constant CEDAR = TREE_INFO_CEDAR
global constant ACACIA = TREE_INFO_ACACIA
global constant OAK = TREE_INFO_OAK
global constant BEECH = TREE_INFO_BEECH
global constant FIR = TREE_INFO_FIR

// Resource constants
global constant ORE = RESOURCE_TYPE_ORE
global constant WOOD = RESOURCE_TYPE_WOOD
global constant FOOD = RESOURCE_TYPE_FOOD

// Visual effects
global constant HEALMIRACLE = VISUAL_MIRACLE_HEAL_IN_HAND
global constant WATERMIRACLE = VISUAL_MIRACLE_WATER_IN_HAND
global constant FIREMIRACLE = VISUAL_MIRACLE_FIRE_IN_HAND

// Abode constants
global constant STOREHOUSE = ABODE_NUMBER_STORAGE_PIT
global constant CREATUREPEN = ABODE_NUMBER_CREATURE_PEN
global constant UNI = ABODE_NUMBER_UNIVERSITY
global constant ALTAR = ABODE_NUMBER_ALTAR
global constant HOUSEA = ABODE_NUMBER_A
global constant HOUSEB = ABODE_NUMBER_B
global constant HOUSEC = ABODE_NUMBER_C
global constant HOUSED = ABODE_NUMBER_D
global constant HOUSEE = ABODE_NUMBER_E
global constant TOWNCENTRE = ABODE_NUMBER_TOWN_CENTRE
global constant OREREFINERY = ABODE_NUMBER_SMELTER
global constant MELEE = ABODE_NUMBER_MELEE_ARMOURY
global constant RANGED = ABODE_NUMBER_RANGED_ARMOURY
global constant FIELD = ABODE_NUMBER_FIELD
global constant BATHHOUSE = ABODE_NUMBER_BATHHOUSE
global constant GATEHOUSE = ABODE_NUMBER_GATEHOUSE
global constant GATEHOUSEF = ABODE_NUMBER_GATEHOUSE_F
global constant WALL = ABODE_NUMBER_WALLTOWER_TECH0
global constant WALLF = ABODE_NUMBER_WALLTOWER_TECH1
global constant GRAVEYARD = ABODE_NUMBER_GRAVEYARD
global constant PRISON = ABODE_NUMBER_PRISON

// Effect constants
global constant WET = EFFECT_TYPE_WET
global constant HEALEFFECT = EFFECT_TYPE_HEAL
global constant HIT = EFFECT_TYPE_HIT
global constant BURN = EFFECT_TYPE_BURN
global constant CRUSH = EFFECT_TYPE_CRUSH

// Mobile Static constants
global constant BOULDERROUND = MOBILE_STATIC_INFO_BOULDER_ROUND

// Miracle type constants
global constant WATER = MIRACLE_TYPE_WATER
global constant HEAL = MIRACLE_TYPE_HEAL
global constant FIRE = MIRACLE_TYPE_FIRE
global constant METEOR = MIRACLE_TYPE_METEOR
global constant STORM = MIRACLE_TYPE_STORM
global constant WIND = MIRACLE_TYPE_WIND

If you have played the betas, all you would have to do to use a ship is to hold the hand over it and click it til it flashes, then left clicking on a position will move it there.
 
I've got to admit that I haven't played the other Beta's.  :blush

I did play this one and it looks nicely put together. Also saw how the ship was controlled.

But, mine doesn't flash. The ShipSelection function is being run. But the ship won't flash.

Btw, I did have those globals already.

Also, why does the ship look half sunk? ???
 
I think the sinking issue has something to do with the height, it just doesnt do wat its told.

Doesnt make sense though why it isnt working, I will take a look into that and get back to you.
 
I did try adjusting the height, but it doesn't make a difference. The funny thing is that in OGaM the boat floats properly but sinks as it get close to the shore.

Any chance that you can package all of the scripts and get them to me. Then I can also test it in the proper enviroment.
 
You guys are amazing. Seriously.

I've watched the gameplay videos and seen/read stuff about the God AI Daxter wrote, and I have to say it looks like you're making much better use of the scripting capabilities than Lionhead did (it was pathetic tbh).

I was pissed off when I realized the game had no real AI and the enemies were just spawning platoons and sending them at me.
 
eh lol dont remind me, I still have to finish the God AI before I start on platoons and stuff. Lionhead didnt play very nice releasing BnW2 with terrible AI so theres still alot of work to be done.
 
Hey guys, it has been a long 2-3 yrs since I started this project and real life continues to push me farther away from it.  :(

Im afraid Im going to have to halt development of OGaM for a while til I get things sorted. It shouldnt take too much longer since I'll be finishing tafe up shortly to free up alot of my time. Im sorry it had to come to this but as the last post was Aug, just over 4 months ago, I havent been able to get anything done.

Im glad I was able to make something out of BnW2 and its been a pleasure modding and innovating BnW2 using the available scripting tools etc.

Of course if anyone would like to take advantage of the God AI in a custom map, I should be able whip up sometime the remaining content it needs but as for OGaM, she needs a break and I would like give her that.

Catchas in a month or so and I'll see how real life turns out, might even return with a secret release. We'll see.  :)
 
well done daxter, ogam has been great and probably the most famous mod of BW2... well... ever. you deserve a rest.


ps: i just realised where your profile photo comes from!
 
I know that we've close to shut down the mod, but I was just reading the Wikipedia article on Black and White 2 (http://en.wikipedia.org/wiki/Black_%26_White_2) and I'd just like to point out the small modifications section towards the bottom of the screen. Dunno if someone here put it there, or if it's just someone else out in the world.
 
The Wikipedia page was last updated Dec. 18th, so that's pretty recent stuff.  Looks like good publicity if you ask me! 
 
wow.... thats wierd. lets hope it wont be deleted by the nazi admins in wikipedia.
 
wow ok thats just wierd. I dont even know that little bit was in there.  :rolleyes

It almost does spark my want to continue on, I'll see what happens in the coming weeks and I have been secretly going over the biggest bugs in detail in the game in my spare time on a tues night, fri and sat just to see what can be done, I can confirm that the ship control scheme is working to its full effectiveness, just need to work on platoon transportation.

I might start pushing the game towards a little micromanagement of development so we can tackle each issue one bit at a time instead of in one chunk, this will both help solve the smaller issues quicker but also make it a less messy job and easier to fit into everyone's current lifestyle, more info about this later.  :)
 
Status
Not open for further replies.
Back
Top