FOnline Development > Questions and Answers

Help for beginer

<< < (3/4) > >>

Powerack:
I have a simple question that would help a lot of players starting on my server. I have registered a holodisk with basic information and I want it to be received by every player who registers the game. The ID of the holodisk is 51 and I already have it written in FOHOLO.MSG in the correct format. Any advice on how to put it in inventory for all new characters? Best in hand?

remake:
main.fos, critter_init function. There're bags defined for new registered characters (131-139, 144-145).
Bags.cfg:
Add ^m suffix to previously defined item.
Or
Use AddItem and MoveItem functions from Critter class in void critter_init(Critter& cr, bool firstTime) function

--- Code: ---if(cr.IsPlayer() && firstTime)
{
   Item@ newItem = cr.AddItem(PID_YOUR_ITEM, 1);
   cr.MoveItem(newItem.Id, newItem.GetCount(), SLOT_HAND1);
}
--- End code ---

Wipe:
As it's about holodisk, i wouldn't bother spawning item at all, just add PipBoy entry directly (you can see that in action in TLA).

Some holodisk-related stuff:

--- Code: ---void Critter::AddHolodiskInfo(uint holodiskNum);
void Critter::EraseHolodiskInfo(uint holodiskNum);
bool Critter::IsHolodiskInfo(uint holodiskNum);

--- End code ---

That could help later, depends how much (and how important) info is there; simply tell player "check start info" instead of making sure item was actually used, spawning item again or repeating info in case player trashed it, and so on.

Powerack:
Hello, I have one question about game modes. I want to turn off turn-based mode on every map and for all players. Where and how to disable this mode? Turn-based is useless for my server. Thanks for reply...

Wipe:

--- Quote from: Powerack on February 05, 2019, 12:18:18 am ---I want to turn off turn-based mode

--- End quote ---
:'( http://www.nooooooooooooooo.com/ :'(

If you're decided to perform such cruel act, and be remembered by history as most cruel terrorist ever, simply remove all checks for MODE_DEFAULT_COMBAT in all functions inviting player to encounters. As maps are created with RT as default mode, once you get rid of all Map::SetTurnBasedAvailability(bool) calls, TB won't be available for anyone, and everyone will be sad.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version