Automatic wiki information

From LobotomyCorp 13 Wiki
Revision as of 11:27, 14 March 2024 by Gboster (talk | contribs) (le basic explanantion about the AutoWiki program thingy)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

What exactly is autowiki

The autowiki file program thingy is something introduced in the Automatic wiki v0.1 #1577 PR

It allows developers to run a script that will automatically fetch all the objects of a certain type and put them in various forms ready to be copy-pasted onto the wiki to accuratelly update information without the need of actually know what specific object was updated

This helps us mostly take a hands-off approach to what would be a very tedious and repetetive task of updating an extremelly large amount of EGO whenever its updated

A good thing to note is that any changes that are made onto a wiki via a web browser thats currently being maintained by the autowiki script will be deleted on the next update.

Any and all changes done to pages being maintained by the autowiki system must be done in the code itself

An example of how it looks

the dreammaker code:

/datum/wiki_template/ego_weapons/proc/generate_output(datum/ego_datum/weapon/item)

	(all the variables being defined go before the template)

	var/created_template = "\n"
	created_template += "{| class=\"wikitable\"\n"
	created_template += "|+ [weapon_name]\n"
	created_template += "| colspan=\"3\" |[weapon_description]\n"
	created_template += "|-\n"
	created_template += "| [damage_template]\n"
	created_template += "| [throw_damage_template]\n"
	created_template += "| rowspan=\"2\" |Fits in EGO belts?\n"
	if(small)
		created_template += "Yes\n"
	else
		created_template += "No\n"
	created_template += "|-\n"
	created_template += "| [weapon_reach_template]\n"
	created_template += "| [extraction_cost_template]\n"
	created_template += "|-\n"
	created_template += "| colspan=\"3\" |Weapon properties:[weapon_properties]\n"
	created_template += "|}"

	return created_template

the dreammaker code compiled into a wiki format

This example will be a compiled version of /datum/ego_datum/weapon/justitia

{| class="wikitable"
|+ Justitia
| colspan="3" |A sharp sword covered in bandages. It may be able to not only cut flesh but trace of sins as well.
|-
| This weapon deals 25 pale damage.
| This weapon cant be effectivelly thrown
| rowspan="2" |Fits in EGO belts?
No
|-
| this weapon does not have extended range
| This weapon costs 100 PE to extract
|-
| colspan="3" |Weapon properties: None
|}

the wiki result:

Justitia
A sharp sword covered in bandages. It may be able to not only cut flesh but trace of sins as well.
This weapon deals 25 pale damage. This weapon cant be effectivelly thrown Fits in EGO belts?

No

this weapon does not have extended range This weapon costs 100 PE to extract
Weapon properties: None