View unanswered posts | View active topics It is currently Fri Mar 29, 2024 5:20 am



Reply to topic  [ 1 post ] 
 New Botlink features - v3.33 
Author Message
Site Admin
User avatar

Joined: Sun Dec 24, 2000 3:00 am
Posts: 3150
Location: USA
Unread post New Botlink features - v3.33
I added a few new features to Botlink.

Sector object:

There is a new function on the sector object for setting off a Photon in a sector. This is a very customizable Photon effect, so you can make it appear as though it's coming from a Fed, a planet or port, an alien or whatever you want. You can make the event silent and just generate your own event message and/or log entries, or you can make it non-silent and provide two custom messages, one for a hit and one for a miss.

The function looks like this:

photonWave(Silent: Boolean = True; HitMessage: String = ""; MissMessage: String = "")

So for example,

>exec mysect.photWave( false, "{c+}Vid Kid{g-} launched a photon into this sector, damaging your ship!", "{c+}Vid Kid{g-} launched a photon into this sector!" )

The {c+} turns on bright cyan, and {g-} turns on dark green, demonstrating how to use color in your messages.


There are also new fields on the Sector object. Sector.WarpCount is read-only and tells you how many warps are in the warp list for the sector. Sector.Warps is an array of warps out of the sector, with 0 meaning "no warp". You can access Warps in a number of ways.

>get mysect.warps
(1605, 912, 881, 0, 0, 0)
0 OK

>get mysect.warps[1]
1605
0 OK

>set mysect.warps[1] = 1000
0 OK

Not only can this be done before a game is activated, allowing you to restructure the game map however you want, but it can also be done while the game is live. Changes to the sector warps will show up immediately for any active players. There is a locking function on the sector called >mysect.lockWarps(lock: boolean) that allows you to lock and unlock the warp list for a given sector. Only that sector will lock, and players will not be able to access the sector warps until you are done updating them and release the warp list. This guarantees that players always have consistent and "finished" warp lists even if you are changing them on the fly (for example, opening up a temporary wormhole).

One last change to the sector object, fighter, armid and limpet fields are no longer read-only. You can assign these assets all at once using the sector setFighters, setArmidMines and setLimpetMines functions, providing the number as well as owner details, but you can also just change one value, like fighter mode or player index or fighter count, making it more convenient to work with these assets.

Game object

A very important new function for the game object is

>exec game.postEvent(Message: String; Target: EventTarget = Online; TargetIndex: Number = 0)

Using this function, you can generate any custom event that will appear in the game like any other game event ("Player X enters the sector", "Player X leaves the sector", etc). So if you want an event that says "Alien X just stole 100 of your sector fighters!", you can do that, and of course you can modify the sector and alien records to reflect this event.

Again, you can use color codes to make your messages pretty. See "SHOW COLOR CODES" to learn how to use them.

There are a number of targets for your messages: Online, Sector, Planet, Port, Citadel, Tavern, Player and Corp. Online will post your event to anyone who's online. Sector will post it to anyone in the specified sector. Planet will post to anyone on the specified planet, same for Port. Citadel will only post the event for players in the Citadel on the specified planet. Tavern only shows the event to someone in the Tavern. Player posts the event to a specific player, and Corp to all members of a specific corporation.

There are three new fields on Game, and these pretty much round out all of the game settings.

Game.flags is a set of CfigFlags ( UsePasswords, Closed, ShowStardock, StealFromBuyPort, MultiplePhotons, NewPlayerPlanets, InvincibleFerrengal, MBBSCombat, DeathDelay, WhosOnline, FedSpacePhotons, ISP, AllowAliases, AlienSleepMode, PhotonDisablesPlayers, MegaRob, MatureContent). You should be familiar with these settings from TEDIT, so i won't describe them all.

You can set these like

>set game.flags[ShowStardock] = true

and read them in one of two ways

>get game.flags
[UsePasswords, ShowStardock, StealFromBuyPort, MBBSCombat,
DeathDelay, WhosOnline, PhotonDisablesPlayers, MegaRob]
0 OK

which shows the set of all active flags, or

>get game.flags[ShowStardock]
True
0 OK

which shows a specific flag setting.

Similar to the flags array are the ClassicAliens and Modes arrays. ClassicAliens shows which classic alien types are active (AlienTraders or Ferrengi). Modes shows which game modes are active (Gold or MBBS). Both of these are read-only since they're set in Bigbang.

Next, I've filled out Terra's functionality. You can now set max colonists, regen percent and current number of colonists using these fields:

Terra.maxColonists
Terra.Colonists
Terra.regenPercent

And last, I added a bunch of new "find" commands to gather information about the game. First, I added an optional modifier to designate a fighter mode in your search. So, wherever you specify a fighter in a find command, you can add OFF, DEF, or TOLL to limit the search to only fighters of that kind.

In addition, I added four new "find" commands; three to list active records and one to list those that are online. Here is the whole group of find commands to show all changes:

FIND SHIPS|PLANETS|[OFF|DEF|TOLL] FIGS|ARMIDS|LIMPETS FOR PLAYER Index
FIND SHIPS|PLANETS|[OFF|DEF|TOLL] FIGS|ARMIDS|LIMPETS FOR CORP Index
FIND SHIPS|PLANETS|[OFF|DEF|TOLL] FIGS|ARMIDS FOR FERRENGI
FIND SHIPS|PLANETS|[OFF|DEF|TOLL] FIGS|ARMIDS|LIMPETS FOR GOLDRACE Index
FIND ABANDONED|ROGUE|PIRATE SHIPS|PLANETS|[OFF|DEF|TOLL] FIGS|ARMIDS|LIMPETS

FIND ACTIVE PLAYERS|FEDS|FERRENGI|ALIENTRADERS
FIND ACTIVE SHIPS|PLANETS|[OFF|DEF|TOLL] FIGS|ARMIDS|LIMPETS
FIND ACTIVE ALIENS|BOSSES FOR INDEX Index
FIND ONLINE PLAYERS|ALIENRACES

FIND PLAYERS|FEDS|FERRENGI|ALIENTRADERS|GOLDALIENS IN SECTOR Index
FIND SHIPS|PLANETS IN SECTOR Index
FIND PLAYERS|GOLDALIENS ON PLANET Index
FIND PLAYERS|GOLDALIENS ON PORT Index
FIND PLAYERS WHERE NAME IS|LIKE "Name"

So, for example,

>find active off figs
629 697 1493 3846 4401
0 OK

lists the sectors where active offensive figs are located.

I'm currently working on adding a set of objects for viewing and changing alien, planet and ship classes (Gold edits). I'm also going to add functions to post log messages, send comms messages to FedComm, radio channel, or private hail, post mail and Corp memos, or generate daily log entries. For completeness, I'll include posting to the bathroom wall and adding to the conversation at the Tavern.

That's it for now. Things are moving along. Almost done with phase 1 core features. Stay tuned for more!

_________________
John Pritchett
EIS
---
Help fund the TradeWars websites! If you open a hosting account with A2 Hosting, the service EIS uses for all of its sites, EIS will earn credits toward its hosting bill.


Fri Feb 10, 2012 4:59 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.